summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Sack <asac@ubuntu.com>2009-07-27 01:33:42 +0200
committerAlexander Sack <asac@ubuntu.com>2009-07-27 01:33:42 +0200
commit27c7eca16db3a7af3a850663ba033f2573972322 (patch)
tree3c24f18bd4ea8c612fb0ac802f5eb388b5f2a95e
parent546e791ac2adfb7d3760f48285d4caacd2574653 (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
-rw-r--r--debian/changelog9
-rw-r--r--src/xpi.mk11
2 files changed, 15 insertions, 5 deletions
diff --git a/debian/changelog b/debian/changelog
index c71a654..258a286 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,15 @@ mozilla-devscripts (0.14) UNRELEASED; urgency=low
the version/package/targetAppId mapping information is currently maintained
in src/xpi.mk itself - thx to Benjamin Drung <bdrung@ubuntu.com> for this
- update src/xpi.mk
+ - 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
-- Alexander Sack <asac@ubuntu.com> Sun, 26 Jul 2009 17:14:39 +0200
diff --git a/src/xpi.mk b/src/xpi.mk
index 975753f..44cc150 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk
@@ -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;