Bug 1128070 - Fix packaging for timezones extension. r=jcranmer,Fallen on SM CLOSED TREE
authorGeoff Lankow <geoff@darktrojan.net>
Thu, 12 Feb 2015 12:08:07 +1300
changeset 21878 ab1b861da0f2f89182e9cc8c14c77e1806eb56d6
parent 21877 645484c48931acc47c915d779286aa8b00845ee7
child 21879 7dc0db8b5e9f50629d27013b3fcb45f18cdaee70
push idunknown
push userunknown
push dateunknown
reviewersjcranmer, Fallen
bugs1128070
Bug 1128070 - Fix packaging for timezones extension. r=jcranmer,Fallen on SM CLOSED TREE
calendar/moz.build
calendar/timezones/Makefile.in
calendar/timezones/config/version.txt
calendar/timezones/install.rdf
calendar/timezones/moz.build
calendar/timezones/version.py
mail/app.mozbuild
suite/app.mozbuild
--- a/calendar/moz.build
+++ b/calendar/moz.build
@@ -1,12 +1,15 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 CONFIGURE_SUBST_FILES += ['installer/Makefile']
 
 if CONFIG['MOZ_CALENDAR']:
-    DIRS += ['lightning']
+    DIRS += [
+        'lightning',
+        'timezones'
+    ]
 
 TEST_DIRS += ['test']
 
--- a/calendar/timezones/Makefile.in
+++ b/calendar/timezones/Makefile.in
@@ -1,32 +1,24 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 USE_EXTENSION_MANIFEST = 1
 DIST_FILES = install.rdf
-XPI_PKGNAME = calendar-timezones
-
-ifndef DISABLE_LIGHTNING_INSTALL
-# install as a global extension in dist/bin/extensions/
-INSTALL_EXTENSION_ID = calendar-timezones@mozilla.org
-endif
+XPI_PKGNAME = calendar-timezones-$(TIMEZONES_VERSION)
 
 THUNDERBIRD_VERSION := $(shell cat $(topsrcdir)/mail/config/version.txt)
 SEAMONKEY_VERSION := $(shell cat $(topsrcdir)/suite/config/version.txt)
 CALENDAR_VERSION := $(shell $(PYTHON) $(topsrcdir)/calendar/lightning/build/makeversion.py $(word 1,$(MOZ_PKG_VERSION) $(THUNDERBIRD_VERSION)))
-TIMEZONES_VERSION := $(shell cat $(srcdir)/config/version.txt)
+TIMEZONES_VERSION := $(shell $(PYTHON) $(srcdir)/version.py)
 
 DEFINES += -DAB_CD=$(AB_CD) \
            -DTHUNDERBIRD_VERSION=$(THUNDERBIRD_VERSION) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DCALENDAR_VERSION=$(CALENDAR_VERSION) \
            -DTIMEZONES_VERSION=$(TIMEZONES_VERSION) \
            $(NULL)
 
-libs::
-	$(NSINSTALL) -m 0644 zones.json $(FINAL_TARGET)/timezones
-
 libs-%:
 	$(MAKE) -C locales libs AB_CD=$* XPI_NAME=calendar-timezones USE_EXTENSION_MANIFEST=1
 
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/calendar/timezones/config/version.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-1.2014b
--- a/calendar/timezones/install.rdf
+++ b/calendar/timezones/install.rdf
@@ -12,25 +12,25 @@
     <em:version>@TIMEZONES_VERSION@</em:version>
 
     <!-- Target Application this extension can install into,
          with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
         <!-- Thunderbird -->
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
-        <em:minVersion>2.0</em:minVersion>
+        <em:minVersion>38.0a1</em:minVersion>
         <em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
     <em:targetApplication>
       <Description>
         <!-- Seamonkey -->
         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
-        <em:minVersion>2.0</em:minVersion>
+        <em:minVersion>2.35a1</em:minVersion>
         <em:maxVersion>@SEAMONKEY_VERSION@</em:maxVersion>
        </Description>
      </em:targetApplication>
 
     <em:name>Timezone Definitions for Mozilla Calendar</em:name>
     <em:unpack>true</em:unpack>
     <em:description>Timezone definitions required by Lightning</em:description>
     <em:creator>Mozilla Calendar Project</em:creator>
--- a/calendar/timezones/moz.build
+++ b/calendar/timezones/moz.build
@@ -9,8 +9,11 @@ XPI_NAME = 'calendar-timezones'
 export('XPI_NAME')
 
 JAR_MANIFESTS += ['jar.mn']
 
 JS_PREFERENCE_FILES += [
     'defaults/preferences.js',
 ]
 
+FINAL_TARGET_FILES.timezones += [
+    'zones.json'
+]
new file mode 100755
--- /dev/null
+++ b/calendar/timezones/version.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+import json, os.path
+
+json_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "zones.json")
+
+with open(json_file, "r") as fp:
+    data = json.load(fp)
+    print data["version"]
--- a/mail/app.mozbuild
+++ b/mail/app.mozbuild
@@ -14,14 +14,17 @@ if CONFIG['MOZ_EXTENSIONS']:
     DIRS += ['/extensions']
 
 DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
 
 if CONFIG['MOZ_COMPOSER']:
     DIRS += ['/editor/ui']
 
 if CONFIG['MOZ_CALENDAR']:
-    DIRS += ['/calendar/lightning']
+    DIRS += [
+        '/calendar/lightning',
+        '/calendar/timezones'
+    ]
 
 DIRS += [
     '/chat',
     '/mail',
 ]
--- a/suite/app.mozbuild
+++ b/suite/app.mozbuild
@@ -12,14 +12,17 @@ if CONFIG['MOZ_EXTENSIONS']:
     DIRS += ['/extensions']
 
 if CONFIG['MOZ_COMPOSER']:
     DIRS += ['/editor/ui']
 
 DIRS += ['/%s' % CONFIG['MOZ_BRANDING_DIRECTORY']]
 
 if CONFIG['MOZ_CALENDAR']:
-    DIRS += ['/calendar/lightning']
+    DIRS += [
+        '/calendar/lightning',
+        '/calendar/timezones'
+    ]
 
 DIRS += [
     '/xpfe/components/autocomplete',
     '/suite',
 ]