diff options
author | Benjamin Drung <bdrung@ubuntu.com> | 2009-09-24 13:01:34 +0200 |
---|---|---|
committer | Benjamin Drung <bdrung@ubuntu.com> | 2009-09-24 13:01:34 +0200 |
commit | 788556e8570cb03752d0936c991c086a8e5cfd5d (patch) | |
tree | 93931ba4a7ac5e0947d66c4753d68a8114422376 /src/xpi.mk | |
parent | d12c31aa436ff1e1b773d71d508a0cec817b72d6 (diff) |
- support different types of install.rdf files (LP: #422898)
- update src/xpi.mk
Diffstat (limited to 'src/xpi.mk')
-rw-r--r-- | src/xpi.mk | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -139,7 +139,7 @@ Ubuntu_packages := abrowser-3.5 firefox-3.0 firefox-3.5 thunderbird seamonkey co # 1- target app id # 2- maxVersion | minVersion # 3- extension dir -TARGET_VERSION = $(shell xpath -q -e '//em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/em:$(2)/text() | //em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/@em:$(2)' $(3)/install.rdf) +TARGET_VERSION = $(shell xpath -q -e '//em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/em:$(2)/text() | //em:targetApplication/Description[em:id="$(1)" or @em:id="$(1)"]/@em:$(2) | //RDF:Description[@em:id="$(1)"]/@em:$(2)' $(3)/install.rdf | sed -e 's/.*"\(.*\)"/\1/') # call parameters_ # 1- target app id @@ -184,13 +184,17 @@ XPI_BASE_FILE = $(notdir $(XPI_FILE)) ifneq (,$(MOZ_XPI_EMID)) XPI_EMID = $(MOZ_XPI_EMID) else -XPI_EMID = $(shell xpath -e '/node()/Description/em:id/text()' $(1)/install.rdf 2>/dev/null) +XPI_EMID = $(sort $(shell xpath -q -e '/node()/Description/em:id/text() | //RDF:Description[@RDF:about="urn:mozilla:install-manifest"]/em:id/text()' $(1)/install.rdf 2>/dev/null) \ + $(shell xpath -q -e '//RDF:Description[@RDF:about="urn:mozilla:install-manifest"]/@em:id' $(1)/install.rdf 2>/dev/null | sed -e 's/.*"\(.*\)"/\1/')) endif ifeq (,$(MOZ_XPI_DISABLE_AUTOLINKS)) +RDF_RESOURCES = $(shell xpath -q -e '//em:targetApplication/@RDF:resource' $(1)/install.rdf | sed -e 's/.*="\(.*\)"/\1/') + XPI_TARGET_EMIDs = \ $(shell xpath -q -e '//em:targetApplication//@em:id' $(1)/install.rdf 2>/dev/null | sed -e 's/.*"\(.*\)"/\1/') \ - $(shell xpath -q -e '//em:targetApplication//em:id/text()' $(1)/install.rdf 2>/dev/null) + $(shell xpath -q -e '//em:targetApplication//em:id/text()' $(1)/install.rdf 2>/dev/null) \ + $(foreach resource,$(RDF_RESOURCES),$(shell xpath -q -e '//RDF:Description[@RDF:about="$(resource)"]/@em:id' $(1)/install.rdf 2>/dev/null | sed -e 's/.*"\(.*\)"/\1/')) endif # local vars |