diff options
authorAlexander Sack <>2008-02-21 12:34:26 +0000
committerAlexander Sack <>2008-02-21 12:34:26 +0000
commitcc808aca7ed6e5c7a968b2b8598aa249a7d76ed4 (patch)
parent8db3b2d83d2bf9c8e39a17ab5f4885ebfe57843c (diff)
parent87f14814ca495dd0016d373821a5e3dbc60cbbc7 (diff)
* merge changes from .local development branch
- keep src/
1 files changed, 25 insertions, 5 deletions
diff --git a/src/ b/src/
index 227c8f5..595d0d8 100644
--- a/src/
+++ b/src/
@@ -35,6 +35,13 @@
# our best to extract the em:id from the install.rdf file shipped
# by any xpi
+# if defined the given command will be run _before_ the extension
+# gets packaged up the standard .xpi way. Thus, the build command
+# should produce an .xpi in top level directory. Note: If this
+# command is specified, all .xpi files in the top level directory
+# will be removed during |clean|
TEMPDIR := $(shell rm -rf temp-xpi-*; mktemp -d temp-xpi-XXXXXXXX)
@@ -50,20 +57,33 @@ else
XPI_EMID = $(shell xpath -e '/node()/Description/em:id/text()' $(1)/install.rdf 2>/dev/null)
-# cdbs hooks (TODO implement these)
+# ### cdbs hooks
+# build xpi using MOZ_XPI_BUILD_COMMAND if defined
+install/$(MOZ_EXTENSION_PKG):: xpi-install
+# clean build and remove all .xpi in top-level if a MOZ_XPI_BUILD_COMMAND is defined
+clean:: xpi-clean
+ rm -f *.xpi
-# general helper targets
+# ### general helper targets
unzip -d $(TEMPDIR) $*
touch $@
dh_installdirs -p$(MOZ_EXTENSION_PKG) /usr/lib/firefox-addons/extensions
dh_install -p$(MOZ_EXTENSION_PKG) $(wildcard $(TEMPDIR)/*) /usr/share/$(MOZ_EXTENSION_PKG)
dh_link -p$(MOZ_EXTENSION_PKG) /usr/share/$(MOZ_EXTENSION_PKG) /usr/lib/firefox-addons/extensions/$(call XPI_EMID,$(TEMPDIR))
touch $@
-stamp-extension-install: $(XPI_FILE) unzip-$(XPI_FILE) install-$(XPI_FILE)
+stamp-extension-install: $(XPI_FILE) stamp-unzip-$(XPI_FILE) stamp-install-$(XPI_FILE)
touch stamp-extension-install