summaryrefslogtreecommitdiff
path: root/src/xpi.mk
diff options
context:
space:
mode:
authorAlexander Sack <asac@ubuntu.com>2009-09-22 15:33:46 +0200
committerAlexander Sack <asac@ubuntu.com>2009-09-22 15:33:46 +0200
commit5f7e07f63655702bb18071e60582a3d03a5e7931 (patch)
tree4fef99b670de83a89674c52c649260e91edc2eaa /src/xpi.mk
parentc51a373fdde3bc0cdce723c18a4fdd9d90e24966 (diff)
+ xpi.mk:
- install extension tree to /usr/share or /usr/lib based on Architecture: field in debian/control for the target package - update src/xpi.mk
Diffstat (limited to 'src/xpi.mk')
-rw-r--r--src/xpi.mk14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/xpi.mk b/src/xpi.mk
index 3e2ed2c..6511fac 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk
@@ -151,6 +151,8 @@ CHECK_VERSION = $(shell \
MOZ_EXTENSION_PKG ?= $(strip $(shell grep ^Package: debian/control | head -n 1 | sed "s/^Package://"))
+MOZ_XPI_ARCH := $(strip $(shell egrep '^Package:|^Architecture:' debian/control | grep -A1 '^Package:[ \t]*$(MOZ_EXTENSION_PKG)$$' | grep ^Architecture: | sed -e 's/Architecture://'))
+
MOZ_XPI_BUILD_COMMAND ?= med-xpi-pack $(CURDIR) $(MOZ_EXTENSION_PKG).xpi;
ALL_XPI_RECOMMENDS = $(sort $(foreach id,$(call XPI_TARGET_EMIDs,$(TEMPDIR)), \
@@ -187,6 +189,14 @@ XPI_TARGET_EMIDs = \
$(shell xpath -q -e '//em:targetApplication//em:id/text()' $(1)/install.rdf)
endif
+# local vars
+# + lib_share_dir - for arch all this is "share"; otherwise "lib"
+ifeq (all, $(MOZ_XPI_ARCH))
+lib_share_dir = share
+else
+lib_share_dir = lib
+endif
+
# ### cdbs hooks
# build xpi using MOZ_XPI_BUILD_COMMAND if defined
build/$(MOZ_EXTENSION_PKG)::
@@ -210,7 +220,7 @@ endif
touch $@
installlinks-%-stamp: unzip-$(XPI_BASE_FILE)-stamp
- dh_link -p$(MOZ_EXTENSION_PKG) /usr/share/$(MOZ_EXTENSION_PKG) /usr/lib/$*/extensions/$(call XPI_EMID,$(TEMPDIR))
+ dh_link -p$(MOZ_EXTENSION_PKG) /usr/$(lib_share_dir)/$(MOZ_EXTENSION_PKG) /usr/lib/$*/extensions/$(call XPI_EMID,$(TEMPDIR))
touch $@
autolinks-stamp: unzip-$(XPI_BASE_FILE)-stamp $(foreach mozilla,$(MOZ_XPI_MOZILLA_DIRS),installlinks-$(mozilla)-stamp)
@@ -218,7 +228,7 @@ autolinks-stamp: unzip-$(XPI_BASE_FILE)-stamp $(foreach mozilla,$(MOZ_XPI_MOZILL
touch $@
install-%-stamp: unzip-%-stamp
- dh_install -p$(MOZ_EXTENSION_PKG) $(wildcard $(TEMPDIR)/*) /usr/share/$(MOZ_EXTENSION_PKG)
+ dh_install -p$(MOZ_EXTENSION_PKG) $(wildcard $(TEMPDIR)/*) /usr/$(lib_share_dir)/$(MOZ_EXTENSION_PKG)
touch $@
xpi-recommends-stamp: unzip-$(XPI_BASE_FILE)-stamp