summaryrefslogtreecommitdiff
path: root/src/xpi.mk
diff options
context:
space:
mode:
Diffstat (limited to 'src/xpi.mk')
-rw-r--r--src/xpi.mk10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/xpi.mk b/src/xpi.mk
index 6289b3c..a6d66ab 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk
@@ -60,6 +60,12 @@
# license files in debian/copyright appropriately. If not defined
# the common license file names are guessed.
#
+# MOZ_EXT_NAME (OPTIONAL):
+# defines the name of the extension (without any prefixes like
+# mozilla- or xul-ext-). If not defined MOZ_EXTENSION_PKG with
+# stripped prefixes is used. This value is used to determine
+# xpi:Provides.
+#
# Deprecated variables:
#
# MOZ_XPI_MOZILLA_DIRS /deprecated/ (OPTIONAL/NODEFAULT - see "Note:"):
@@ -166,10 +172,10 @@ else
XPI_RECOMMENDS = ALL_XPI_RECOMMENDS
endif
-EXTENSION_BASE_NAME := $(patsubst xul-ext-%,%,$(MOZ_EXTENSION_PKG))
+MOZ_EXT_NAME ?= $(shell echo $(MOZ_EXTENSION_PKG) | sed "s/^firefox-//;s/^iceweasel-//;s/^mozilla-//;s/^xul-ext-//")
strip_version = $(sort $(foreach package,$(1),$(shell echo $(package) | sed "s/-[0-9.]*$$//")))
-XPI_PROVIDES = $(EXTENSION_BASE_NAME) $(addsuffix -$(EXTENSION_BASE_NAME),$(call strip_version,$(XPI_RECOMMENDS)))
+XPI_PROVIDES = $(sort $(filter-out $(MOZ_EXTENSION_PKG),$(MOZ_EXT_NAME) $(addsuffix -$(MOZ_EXT_NAME),xul-ext $(call strip_version,$(XPI_RECOMMENDS)))))
TEMPDIR := temp-xpi-unpacked