From eed791e4db78d36f5cf8456058a4ab48815e2931 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Thu, 24 Sep 2009 13:53:32 +0200 Subject: - add MOZ_EXT_NAME option (used for calculating xpi:Provides) - update src/xpi.mk --- src/xpi.mk | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/xpi.mk') 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 -- cgit v1.2.3