summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Drung <bdrung@ubuntu.com>2009-10-06 19:02:53 +0200
committerBenjamin Drung <bdrung@ubuntu.com>2009-10-06 19:02:53 +0200
commit06e74ac9929f2c7e6e425ac862e04fb5db303036 (patch)
tree3e0eebd202b6b07427fdfab688185bca8959772f /src
parent0b010ce323053e259880a980fd95026bac36b9db (diff)
- move data for the automagic detection of target application packages
into separate xpi-data-*.mk files and set default MOZ_XPI_DISTRO when installing mozilla-devscripts - rename src/xpi.mk to src/xpi.mk.in and update it - add src/xpi-data-all.mk - add src/xpi-data-common.mk - add src/xpi-data-Debian.mk - add src/xpi-data-Ubuntu.mk - update debian/control - update src/Makefile
Diffstat (limited to 'src')
-rw-r--r--src/Makefile7
-rw-r--r--src/xpi-data-Debian.mk40
-rw-r--r--src/xpi-data-Ubuntu.mk52
-rw-r--r--src/xpi-data-all.mk51
-rw-r--r--src/xpi-data-common.mk34
-rw-r--r--src/xpi.mk.in (renamed from src/xpi.mk)76
6 files changed, 189 insertions, 71 deletions
diff --git a/src/Makefile b/src/Makefile
index a34d2c1..bb4a97b 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -43,12 +43,16 @@ subst_files = \
mozclient.mk \
compare.mk \
minefield-packager.mk \
+ xpi.mk \
xulapp.mk \
$(NULL)
extra_files = \
- xpi.mk \
lp-locale-export.mk \
+ xpi-data-all.mk \
+ xpi-data-common.mk \
+ xpi-data-Debian.mk \
+ xpi-data-Ubuntu.mk \
$(NULL)
bindir_files = \
@@ -70,6 +74,7 @@ extra_dirs = \
-e "s|^\(MOZCLIENT_EXCLUDE_SCRIPT.*=[ ][ ]*\)\(.*/\)\(.*\)|\1$(DATADIR)/\3|" \
-e "s|^\(MOZCLIENT_PATCHES.*=[ ][ ]*\)\(.*/\)\(.*\)|\1$(DATADIR)/\3|" \
-e "s|^\(MOZDEVSCRIPT_DIR.*=[ ]*\)\(.*\)|\1$(DATADIR)/\2|" \
+ -e "s|@DISTRO@|$(shell lsb_release -si)|" \
> $@
chmod 644 $@
diff --git a/src/xpi-data-Debian.mk b/src/xpi-data-Debian.mk
new file mode 100644
index 0000000..2370414
--- /dev/null
+++ b/src/xpi-data-Debian.mk
@@ -0,0 +1,40 @@
+# -*- mode: makefile; coding: utf-8 -*-
+
+# Copyright (c) 2009 Canonical Ltd.
+# Author(s): Benjamin Drung <bdrung@ubuntu.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+_xpi_makefile_path ?= /usr/share/mozilla-devscripts
+
+ifndef _xpi_data_Debian
+_xpi_data_Debian = 1
+
+include $(_xpi_makefile_path)/xpi-data-common.mk
+
+iceweasel_sol := 2.0
+iceweasel_eol := *
+
+icedove_sol := 1.5.0.7
+icedove_eol := *
+
+iceape_sol := 1.0.6
+iceape_eol := *
+
+packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} += iceweasel
+packages_{3550f703-e582-4d05-9a08-453d09bdfdc6} += icedove
+packages_{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} += iceape
+
+endif
diff --git a/src/xpi-data-Ubuntu.mk b/src/xpi-data-Ubuntu.mk
new file mode 100644
index 0000000..dfe1fa9
--- /dev/null
+++ b/src/xpi-data-Ubuntu.mk
@@ -0,0 +1,52 @@
+# -*- mode: makefile; coding: utf-8 -*-
+
+# Copyright (c) 2009 Canonical Ltd.
+# Author(s): Benjamin Drung <bdrung@ubuntu.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+_xpi_makefile_path ?= /usr/share/mozilla-devscripts
+
+ifndef _xpi_data_Ubuntu
+_xpi_data_Ubuntu = 1
+
+include $(_xpi_makefile_path)/xpi-data-common.mk
+
+abrowser-3.5_sol := 3.5b4
+abrowser-3.5_eol := 3.5.*
+firefox-3.0_sol := 3.0a8
+firefox-3.0_eol := 3.0.*
+firefox-3.5_sol := 3.5b4
+firefox-3.5_eol := 3.5.*
+
+thunderbird_sol := 2.0
+thunderbird_eol := 2.0.0.*
+
+seamonkey_sol := 1.1.6
+seamonkey_eol := *
+
+sunbird_sol := 0.5
+sunbird_eol := *
+
+prism_sol := 0.8
+prism_eol := *
+
+packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} += firefox-3.5 abrowser-3.5 firefox-3.0
+packages_{3550f703-e582-4d05-9a08-453d09bdfdc6} += thunderbird
+packages_{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} += seamonkey
+packages_{e2fda1a4-762b-4020-b5ad-a41df1933103} += sunbird
+packages_prism@developer.mozilla.org += prism
+
+endif
diff --git a/src/xpi-data-all.mk b/src/xpi-data-all.mk
new file mode 100644
index 0000000..9ee4cc2
--- /dev/null
+++ b/src/xpi-data-all.mk
@@ -0,0 +1,51 @@
+# -*- mode: makefile; coding: utf-8 -*-
+
+# Copyright (c) 2009 Canonical Ltd.
+# Author(s): Benjamin Drung <bdrung@ubuntu.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+_xpi_makefile_path ?= /usr/share/mozilla-devscripts
+
+ifndef _xpi_data_all
+_xpi_data_all = 1
+
+abrowser-3.0_sol := 3.0a8
+abrowser-3.0_eol := 3.0.*
+abrowser-3.6_sol := 3.6a1pre
+abrowser-3.6_eol := 3.6.*
+abrowser-3.7_sol := 3.7a1pre
+abrowser-3.7_eol := 3.7.*
+firefox-3.6_sol := 3.6a1pre
+firefox-3.6_eol := 3.6.*
+firefox-3.7_sol := 3.7a1pre
+firefox-3.7_eol := 3.7.*
+
+thunderbird-3.0_sol := 3.0a1pre
+thunderbird-3.0_eol := 3.0.*
+
+xulrunner-1.9.2_sol := 1.9.2a1pre
+xulrunner-1.9.2_eol := 1.9.2.*
+xulrunner-1.9.3_sol := 1.9.3a1pre
+xulrunner-1.9.3_eol := 1.9.3.*
+
+packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} += firefox-3.7 abrowser-3.7 firefox-3.6 abrowser-3.6 abrowser-3.0
+packages_{3550f703-e582-4d05-9a08-453d09bdfdc6} += thunderbird-3.0
+packages_toolkit@mozilla.org += xulrunner-1.9.3 xulrunner-1.9.2
+
+include $(_xpi_makefile_path)/xpi-data-Debian.mk
+include $(_xpi_makefile_path)/xpi-data-Ubuntu.mk
+
+endif
diff --git a/src/xpi-data-common.mk b/src/xpi-data-common.mk
new file mode 100644
index 0000000..8d984e2
--- /dev/null
+++ b/src/xpi-data-common.mk
@@ -0,0 +1,34 @@
+# -*- mode: makefile; coding: utf-8 -*-
+
+# Copyright (c) 2009 Canonical Ltd.
+# Author(s): Benjamin Drung <bdrung@ubuntu.com>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ifndef _xpi_data_common
+_xpi_data_common = 1
+
+conkeror_sol := 0.9
+conkeror_eol := *
+
+xulrunner-1.9_sol := 1.9a1pre
+xulrunner-1.9_eol := 1.9.0.*
+xulrunner-1.9.1_sol := 1.9.1a1pre
+xulrunner-1.9.1_eol := 1.9.1.*
+
+packages_{a79fe89b-6662-4ff4-8e88-09950ad4dfde} += conkeror
+packages_toolkit@mozilla.org += xulrunner-1.9.1 xulrunner-1.9
+
+endif
diff --git a/src/xpi.mk b/src/xpi.mk.in
index a1f4925..9e8219e 100644
--- a/src/xpi.mk
+++ b/src/xpi.mk.in
@@ -78,67 +78,11 @@
# migrate your code to MOZ_XPI_MOZILLA_EXTRA_DIRS
#
-# data for XPI_RECOMMENDS/CHECK_VERSION magic - start/end of life of binary packages
-abrowser-3.0_sol := 3.0a8
-abrowser-3.0_eol := 3.0.*
-abrowser-3.5_sol := 3.5b4
-abrowser-3.5_eol := 3.5.*
-abrowser-3.6_sol := 3.6a1pre
-abrowser-3.6_eol := 3.6.*
-abrowser-3.7_sol := 3.7a1pre
-abrowser-3.7_eol := 3.7.*
-firefox-3.0_sol := 3.0a8
-firefox-3.0_eol := 3.0.*
-firefox-3.5_sol := 3.5b4
-firefox-3.5_eol := 3.5.*
-firefox-3.6_sol := 3.6a1pre
-firefox-3.6_eol := 3.6.*
-firefox-3.7_sol := 3.7a1pre
-firefox-3.7_eol := 3.7.*
-iceweasel_sol := 2.0
-iceweasel_eol := *
+MOZ_XPI_DISTRO ?= @DISTRO@
-icedove_sol := 1.5.0.7
-icedove_eol := *
-thunderbird_sol := 2.0
-thunderbird_eol := 2.0.0.*
-thunderbird-3.0_sol := 3.0a1pre
-thunderbird-3.0_eol := 3.0.*
-
-iceape_sol := 1.0.6
-iceape_eol := *
-seamonkey_sol := 1.1.6
-seamonkey_eol := *
-
-conkeror_sol := 0.9
-conkeror_eol := *
-
-prism_sol := 0.8
-prism_eol := *
-
-sunbird_sol := 0.5
-sunbird_eol := *
-
-xulrunner-1.9_sol := 1.9a1pre
-xulrunner-1.9_eol := 1.9.0.*
-xulrunner-1.9.1_sol := 1.9.1a1pre
-xulrunner-1.9.1_eol := 1.9.1.*
-xulrunner-1.9.2_sol := 1.9.2a1pre
-xulrunner-1.9.2_eol := 1.9.2.*
-xulrunner-1.9.3_sol := 1.9.3a1pre
-xulrunner-1.9.3_eol := 1.9.3.*
-
-# data for XPI_RECOMMENDS/CHECK_VERSION magic - targetApplication packages
-packages_{ec8030f7-c20a-464f-9b0e-13a3a9e97384} := abrowser-3.0 abrowser-3.5 abrowser-3.6 abrowser-3.7 firefox-3.0 firefox-3.5 firefox-3.6 firefox-3.7 iceweasel
-packages_{3550f703-e582-4d05-9a08-453d09bdfdc6} := icedove thunderbird thunderbird-3.0
-packages_{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} := iceape seamonkey
-packages_{a79fe89b-6662-4ff4-8e88-09950ad4dfde} := conkeror
-packages_prism@developer.mozilla.org := prism
-packages_toolkit@mozilla.org := xulrunner-1.9 xulrunner-1.9.1 xulrunner-1.9.2 xulrunner-1.9.3
-
-# distribution package list
-Debian_packages := iceweasel icedove iceape conkeror xulrunner-1.9 xulrunner-1.9.1
-Ubuntu_packages := abrowser-3.5 firefox-3.0 firefox-3.5 thunderbird seamonkey conkeror prism xulrunner-1.9 xulrunner-1.9.1
+# xpi-data-*.mk must define packages_*, *_sol, and *_eol
+_xpi_makefile_path ?= /usr/share/mozilla-devscripts
+include $(_xpi_makefile_path)/xpi-data-$(MOZ_XPI_DISTRO).mk
# data for XPI_RECOMMENDS/CHECK_VERSION magic - targetApplication min-/maxVersions
# call parameters_
@@ -161,17 +105,9 @@ MOZ_XPI_ARCH := $(strip $(shell egrep '^Package:|^Architecture:' debian/control
MOZ_XPI_BUILD_COMMAND ?= med-xpi-pack $(CURDIR) $(MOZ_EXTENSION_PKG).xpi
-ALL_XPI_RECOMMENDS = $(sort $(foreach id,$(call XPI_TARGET_EMIDs,$(TEMPDIR)), \
+XPI_RECOMMENDS = $(strip $(foreach id,$(call XPI_TARGET_EMIDs,$(TEMPDIR)), \
$(foreach package,$(packages_$(id)),$(call CHECK_VERSION,$(id),$(package)))))
-# list only packages, which are available in the distribution
-DISTRIBUTION := $(shell lsb_release -si)
-ifneq ($($(DISTRIBUTION)_packages),)
-XPI_RECOMMENDS = $(filter $($(DISTRIBUTION)_packages),$(ALL_XPI_RECOMMENDS))
-else
-XPI_RECOMMENDS = ALL_XPI_RECOMMENDS
-endif
-
MOZ_EXT_NAME ?= $(shell echo $(MOZ_EXTENSION_PKG) | sed "s/^firefox-//;s/^iceweasel-//;s/^mozilla-//;s/^xul-ext-//")
ifeq ($(MOZ_EXT_NAME),$(strip $(shell grep ^Source: debian/control | sed "s/^Source://")))
@@ -271,7 +207,7 @@ endif
if test -f debian/$(MOZ_EXTENSION_PKG).substvars; then sed -i '/^xpi:Provides=/d' debian/$(MOZ_EXTENSION_PKG).substvars; fi
echo "xpi:Provides=$(XPI_PROVIDES)" | sed "s/ /, /g" >> debian/$(MOZ_EXTENSION_PKG).substvars
if test -f debian/$(MOZ_EXTENSION_PKG).substvars; then sed -i '/^xpi:Enhances=/d' debian/$(MOZ_EXTENSION_PKG).substvars; fi
- echo "xpi:Enhances=$(XPI_RECOMMENDS)" | sed "s/ /, /g" >> debian/$(MOZ_EXTENSION_PKG).substvars
+ echo "xpi:Enhances=$(sort $(XPI_RECOMMENDS))" | sed "s/ /, /g" >> debian/$(MOZ_EXTENSION_PKG).substvars
touch $@
xpi-install: $(patsubst %,install-%-stamp,$(XPI_BASE_FILE)) autolinks-stamp xpi-recommends-stamp