diff options
author | Alexander Sack <asac@ubuntu.com> | 2009-07-27 01:33:42 +0200 |
---|---|---|
committer | Alexander Sack <asac@ubuntu.com> | 2009-07-27 01:33:42 +0200 |
commit | 27c7eca16db3a7af3a850663ba033f2573972322 (patch) | |
tree | 3c24f18bd4ea8c612fb0ac802f5eb388b5f2a95e /src/xpi.mk | |
parent | 546e791ac2adfb7d3760f48285d4caacd2574653 (diff) |
- first pitch on automagic max/min version detection implemented; add a generic
|TARGET_VERSION| call taking parameters a) appid, b) maxVersion|minVersion and
c) extension-dir; this call is then used to parse the right max/minVersion
for a given targetApplication on demand in |CHECK_VERSION|. In this way we
now filter out unsuitable packages from xpi:Depends based on the install.rdf
version bounds; Note: currently uses dpkg --compare-versions, which is wrong
for mozilla versions; but works good enough until with have a
mozpkg --compare-versions script
- update src/xpi.mk
Diffstat (limited to 'src/xpi.mk')
-rw-r--r-- | src/xpi.mk | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -74,13 +74,14 @@ target_versions_{3550f703-e582-4d05-9a08-453d09bdfdc6} := 2.0 # data for XPI_DEPENDS/CHECK_VERSION magic - targetApplication min-/maxVersions # FIXME: find a way to get this information -target_maxVersion_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} := 3.6a1pre -target_minVersion_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} := 2.0 -target_maxVersion_{3550f703-e582-4d05-9a08-453d09bdfdc6} := 3.0b3pre -target_minVersion_{3550f703-e582-4d05-9a08-453d09bdfdc6} := 2.0 +# call parameters_ +# 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) # TODO: Use correct comparison -CHECK_VERSION = $(shell dpkg --compare-versions $(target_minVersion_$(1)) le $(2) && dpkg --compare-versions $(2) le $(target_maxVersion_$(1)) && echo $(target_packages_$(1)_$(2))) +CHECK_VERSION = $(shell dpkg --compare-versions $(call TARGET_VERSION,$(1),minVersion,$(TEMPDIR)) le $(2) && dpkg --compare-versions $(2) le $(call TARGET_VERSION,$(1),maxVersion,$(TEMPDIR)) && echo $(target_packages_$(1)_$(2))) MOZ_XPI_BUILD_COMMAND ?= med-xpi-pack $(CURDIR) $(MOZ_EXTENSION_PKG).xpi; |