[gnome-shell-extensions] Add capability to build extension zip-files
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] Add capability to build extension zip-files
- Date: Sat, 19 Nov 2011 15:55:20 +0000 (UTC)
commit 9e4156a7067f6b9aaa16cc89fc85e2ef23bfc694
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Nov 19 15:42:27 2011 +0100
Add capability to build extension zip-files
Now, typing "make zip-file" will create a standard zip-file for each
extension, with everything necessary, including translations and GSettings schemas.
These files can then be installed with the tweak-tool or uploaded
at extensions.gnome.org
Based on an earlier patch by Jasper St. Pierre.
Makefile.am | 21 +++++++++++++++++++++
extension.mk | 10 +---------
extensions/alternate-tab/Makefile.am | 2 +-
extensions/auto-move-windows/Makefile.am | 2 +-
extensions/dock/Makefile.am | 2 +-
extensions/native-window-placement/Makefile.am | 2 +-
extensions/user-theme/Makefile.am | 2 +-
include.mk | 11 +++++++++++
8 files changed, 38 insertions(+), 14 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index faea6d6..65176d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,3 +3,24 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = extensions po
DISTCHECK_CONFIGURE_FLAGS = --enable-extensions=all
+
+include include.mk
+
+zip-file: all
+ -rm -fR $(builddir)/_build
+ -rm -fR $(builddir)/zip-files
+ mkdir $(builddir)/_build; \
+ mkdir $(builddir)/zip-files; \
+ $(MAKE) install DESTDIR="`pwd`/_build"; \
+ for i in $(ENABLED_EXTENSIONS); do \
+ mv "`pwd`/_build/$(topextensiondir)/$${i}$(extensionbase)" "`pwd`/_build/"; \
+ cp -r "`pwd`/_build/$(datadir)/locale" "`pwd`/_build/$${i}$(extensionbase)"; \
+ if [ -f "`pwd`/_build/$(datadir)/glib-2.0/schemas/$(gschemabase).$${i}.gschema.xml" ]; then \
+ mkdir "`pwd`/_build/$${i}$(extensionbase)/schemas"; \
+ mv "`pwd`/_build/$(datadir)/glib-2.0/schemas/$(gschemabase).$${i}.gschema.xml" "`pwd`/_build/$${i}$(extensionbase)/schemas"; \
+ glib-compile-schemas "`pwd`/_build/$${i}$(extensionbase)/schemas"; \
+ fi; \
+ (cd "`pwd`/_build/$${i}$(extensionbase)"; \
+ zip -qr "$(abs_builddir)/zip-files/$${i}$(extensionbase).shell-extension.zip" .; \
+ ); \
+ done
diff --git a/extension.mk b/extension.mk
index 1301dce..b16f64f 100644
--- a/extension.mk
+++ b/extension.mk
@@ -1,12 +1,4 @@
-extensionurl = http://git.gnome.org/gnome-shell-extensions
-
-# Change these to modify how installation is performed
-topextensiondir = $(datadir)/gnome-shell/extensions
-extensionbase = @gnome-shell-extensions.gcampax.github.com
-
-uuid = $(EXTENSION_ID)$(extensionbase)
-
-extensiondir = $(topextensiondir)/$(uuid)
+include $(top_srcdir)/include.mk
dist_extension_DATA = extension.js stylesheet.css
nodist_extension_DATA = metadata.json $(EXTRA_EXTENSION)
diff --git a/extensions/alternate-tab/Makefile.am b/extensions/alternate-tab/Makefile.am
index 2e3930e..bade7cd 100644
--- a/extensions/alternate-tab/Makefile.am
+++ b/extensions/alternate-tab/Makefile.am
@@ -2,7 +2,7 @@ EXTENSION_ID = alternate-tab
include ../../extension.mk
-gschemas_in = org.gnome.shell.extensions.alternate-tab.gschema.xml.in
+gschemas_in = $(gschemabase).alternate-tab.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/extensions/auto-move-windows/Makefile.am b/extensions/auto-move-windows/Makefile.am
index 79dda61..be6e7bc 100644
--- a/extensions/auto-move-windows/Makefile.am
+++ b/extensions/auto-move-windows/Makefile.am
@@ -2,7 +2,7 @@ EXTENSION_ID = auto-move-windows
include ../../extension.mk
-gschemas_in = org.gnome.shell.extensions.auto-move-windows.gschema.xml.in
+gschemas_in = $(gschemabase).auto-move-windows.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/extensions/dock/Makefile.am b/extensions/dock/Makefile.am
index 41be99f..827f81c 100644
--- a/extensions/dock/Makefile.am
+++ b/extensions/dock/Makefile.am
@@ -2,7 +2,7 @@ EXTENSION_ID = dock
include ../../extension.mk
-gschemas_in = org.gnome.shell.extensions.dock.gschema.xml.in
+gschemas_in = $(gschemabase).dock.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/extensions/native-window-placement/Makefile.am b/extensions/native-window-placement/Makefile.am
index 6d86e1f..0d6c4bc 100644
--- a/extensions/native-window-placement/Makefile.am
+++ b/extensions/native-window-placement/Makefile.am
@@ -2,7 +2,7 @@ EXTENSION_ID = native-window-placement
include ../../extension.mk
-gschemas_in = org.gnome.shell.extensions.native-window-placement.gschema.xml.in
+gschemas_in = $(gschemabase).native-window-placement.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/extensions/user-theme/Makefile.am b/extensions/user-theme/Makefile.am
index 6f237eb..300701a 100644
--- a/extensions/user-theme/Makefile.am
+++ b/extensions/user-theme/Makefile.am
@@ -2,7 +2,7 @@ EXTENSION_ID = user-theme
include ../../extension.mk
-gschemas_in = org.gnome.shell.extensions.user-theme.gschema.xml.in
+gschemas_in = $(gschemabase).user-theme.gschema.xml.in
@INTLTOOL_XML_NOMERGE_RULE@
diff --git a/include.mk b/include.mk
new file mode 100644
index 0000000..84b7c64
--- /dev/null
+++ b/include.mk
@@ -0,0 +1,11 @@
+extensionurl = http://git.gnome.org/gnome-shell-extensions
+
+# Change these to modify how installation is performed
+topextensiondir = $(datadir)/gnome-shell/extensions
+extensionbase = @gnome-shell-extensions.gcampax.github.com
+
+gschemabase = org.gnome.shell.extensions
+
+uuid = $(EXTENSION_ID)$(extensionbase)
+
+extensiondir = $(topextensiondir)/$(uuid)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]