summaryrefslogtreecommitdiff
path: root/src/xpi.mk
diff options
context:
space:
mode:
authorBenjamin Drung <bdrung@ubuntu.com>2009-09-23 01:37:33 +0200
committerBenjamin Drung <bdrung@ubuntu.com>2009-09-23 01:37:33 +0200
commit039b417452cc539388e43ee9d7ca302736f20462 (patch)
tree3223ae0d7152b5fcab774b0b2d85a26f2bbfead5 /src/xpi.mk
parent2b52c2018cd6c38e380578450430b0e76af20bdd (diff)
- add ${xpi:Provides} and ${xpi:Enhances} to support the Debian policy for
packaging extensions: http://wiki.debian.org/Teams/DebianMozExtTeam - update src/xpi.mk
Diffstat (limited to 'src/xpi.mk')
-rw-r--r--src/xpi.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xpi.mk b/src/xpi.mk
index db14550..5c1db2e 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk
@@ -166,6 +166,9 @@ else
XPI_RECOMMENDS = ALL_XPI_RECOMMENDS
endif
+strip_version = $(sort $(foreach package,$(1),$(shell echo $(package) | sed "s/-[0-9.]*$$//")))
+XPI_PROVIDES = $(addsuffix -$(patsubst xul-ext-%,%,$(MOZ_EXTENSION_PKG)),$(call strip_version,$(XPI_RECOMMENDS)))
+
TEMPDIR := temp-xpi-unpacked
ifneq (,$(MOZ_XPI_FILE))
@@ -239,6 +242,10 @@ ifneq ($(shell grep '$${xpi:Depends}' debian/control),)
if test -f debian/$(MOZ_EXTENSION_PKG).substvars; then sed -i '/^xpi:Depends=/d' debian/$(MOZ_EXTENSION_PKG).substvars; fi
echo "xpi:Depends=$(XPI_RECOMMENDS)" | sed "s/ / | /g" >> debian/$(MOZ_EXTENSION_PKG).substvars
endif
+ if test -f debian/$(MOZ_EXTENSION_PKG).substvars; then sed -i '/^xpi:Provides=/d' debian/$(MOZ_EXTENSION_PKG).substvars; fi
+ echo "xpi:Provides=$(XPI_PROVIDES)" | sed "s/ /, /g" >> debian/$(MOZ_EXTENSION_PKG).substvars
+ if test -f debian/$(MOZ_EXTENSION_PKG).substvars; then sed -i '/^xpi:Enhances=/d' debian/$(MOZ_EXTENSION_PKG).substvars; fi
+ echo "xpi:Enhances=$(XPI_RECOMMENDS)" | sed "s/ /, /g" >> debian/$(MOZ_EXTENSION_PKG).substvars
touch $@
xpi-install: install-$(XPI_BASE_FILE)-stamp autolinks-stamp xpi-recommends-stamp