path: root/src
diff options
authorAlexander Sack <>2008-02-21 12:31:21 +0000
committerAlexander Sack <>2008-02-21 12:31:21 +0000
commit87f14814ca495dd0016d373821a5e3dbc60cbbc7 (patch)
tree851145554ab12ad69aa6cad6f8d1e17b442de710 /src
parent809c853639f4893263aa7b6a893ee19d7f84d56a (diff)
* rename stamp files: use stamp- as a prefix
- update src/ * implement default cdbs hooks for build, install and clean - update src/ * implement new variable MOZ_XPI_BUILD_COMMAND which is run at cdbs build/PACKAGENAME stage if defined; if defined we remove all .xpi files from top-level directory in |clean| accordingly - update src/
Diffstat (limited to '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