summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog5
-rw-r--r--src/xpi.mk25
2 files changed, 23 insertions, 7 deletions
diff --git a/debian/changelog b/debian/changelog
index 1875f4f..299094c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-mozilla-devscripts (0.05~mt1) hardy; urgency=low
+mozilla-devscripts (0.05) UNRELEASED; urgency=low
[ Fabien Tassin ]
* Update mozclient patch for xulbrowser now that firefox 3 needs
@@ -17,6 +17,9 @@ mozilla-devscripts (0.05~mt1) hardy; urgency=low
- update debian/control
* add unzip (needed by xpi.mk) to Depends: of mozilla-devscript binary package
- update debian/control
+ * introduce MOZ_XPI_MOZILLA_DIRS in xpi.mk with default values: "firefox-addons
+ firefox"
+ - update src/xpi.mk
-- Fabien Tassin <fta@sofaraway.org> Fri, 15 Feb 2008 22:02:42 +0100
diff --git a/src/xpi.mk b/src/xpi.mk
index 595d0d8..8f2a5ac 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk
@@ -41,8 +41,16 @@
# 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|
+# MOZ_XPI_MOZILLA_DIRS (DEFAULT=firefox-addons firefox):
+# defines in which directories to create links for this extension.
+# the default is "firefox-addons" and "firefox", which means that
+# the extension will be linked appropriately to the
+# /usr/lib/firefox-addons/extensions and the /usr/lib/firefox/extensions
+# directories.
#
+MOZ_XPI_MOZILLA_DIRS ?= firefox-addons firefox
+
TEMPDIR := $(shell rm -rf temp-xpi-*; mktemp -d temp-xpi-XXXXXXXX)
ifneq (,$(MOZ_XPI_FILE))
@@ -77,14 +85,20 @@ stamp-unzip-%:
unzip -d $(TEMPDIR) $*
touch $@
-stamp-install-%:
- dh_installdirs -p$(MOZ_EXTENSION_PKG) /usr/lib/firefox-addons/extensions
+stamp-installdirs-%:
+ dh_installdirs -p$(MOZ_EXTENSION_PKG) /usr/lib/$*/extensions
+ touch $@
+
+stamp-installlinks-%:
+ dh_link -p$(MOZ_EXTENSION_PKG) /usr/share/$(MOZ_EXTENSION_PKG) /usr/lib/$*/extensions/$(call XPI_EMID,$(TEMPDIR))
+ touch $@
+
+stamp-install-%: $(foreach mozilla,$(MOZ_XPI_MOZILLA_DIRS),stamp-installdirs-$(mozilla) stamp-installlinks-$(mozilla))
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) stamp-unzip-$(XPI_FILE) stamp-install-$(XPI_FILE)
- touch stamp-extension-install
+ touch $@
# only attempt to do things if a pkg was provided; otherwise error out
@@ -94,8 +108,7 @@ xpi-install: stamp-extension-install
xpi-clean:
dh_clean -p$(MOZ_EXTENSION_PKG)
-rm -f stamp-extension-install \
- unzip-* \
- install-* \
+ stamp-* \
$(NULL)
-rm -rf $(TEMPDIR)