Rename firefox-*.mac64.dmg to firefox-*.mac.dmg. r=ted, a=benjamin, CLOSED TREE
[gecko.git] / toolkit / mozapps / installer / package-name.mk
blobd4db2d498bb5d9d1316e00e56f4700e62ffd5499
1 # ***** BEGIN LICENSE BLOCK *****
2 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 # The contents of this file are subject to the Mozilla Public License Version
5 # 1.1 (the "License"); you may not use this file except in compliance with
6 # the License. You may obtain a copy of the License at
7 # http://www.mozilla.org/MPL/
9 # Software distributed under the License is distributed on an "AS IS" basis,
10 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 # for the specific language governing rights and limitations under the
12 # License.
14 # The Original Code is Mozilla toolkit packaging scripts.
16 # The Initial Developer of the Original Code is
17 # Benjamin Smedberg <bsmedberg@covad.net>
19 # Portions created by the Initial Developer are Copyright (C) 2004
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
23 # Robert Kaiser <kairo@kairo.at>
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 # assemble package names, see convention at
40 # http://developer.mozilla.org/index.php?title=En/Package_Filename_Convention
41 # for (at least Firefox) releases we use a different format with directories,
42 # e.g. win32/de/Firefox Setup 3.0.1.exe
43 # the latter format is triggered with MOZ_PKG_PRETTYNAMES=1
45 ifndef MOZ_PKG_VERSION
46 MOZ_PKG_VERSION = $(MOZ_APP_VERSION)
47 endif
49 ifndef MOZ_PKG_PLATFORM
50 MOZ_PKG_PLATFORM := $(TARGET_OS)-$(TARGET_CPU)
52 # TARGET_OS/TARGET_CPU may be unintuitive, so we hardcode some special formats
53 ifeq ($(OS_ARCH),WINNT)
54 ifeq ($(TARGET_CPU),x86_64)
55 MOZ_PKG_PLATFORM := win64-$(TARGET_CPU)
56 else
57 MOZ_PKG_PLATFORM := win32
58 endif
59 endif
60 ifeq ($(OS_ARCH),Darwin)
61 ifdef UNIVERSAL_BINARY
62 MOZ_PKG_PLATFORM := mac
63 else
64 ifeq ($(TARGET_CPU),x86_64)
65 MOZ_PKG_PLATFORM := mac64
66 else
67 MOZ_PKG_PLATFORM := mac
68 endif
69 endif
70 endif
71 ifeq ($(TARGET_OS),linux-gnu)
72 MOZ_PKG_PLATFORM := linux-$(TARGET_CPU)
73 endif
74 ifeq ($(OS_ARCH),OS2)
75 MOZ_PKG_PLATFORM := os2
76 endif
77 ifeq ($(OS_ARCH),BeOS)
78 ifeq (,$(filter-out 6.%, $(OS_RELEASE)))
79 MOZ_PKG_PLATFORM := Zeta
80 else
81 ifeq (,$(filter-out 5.1, $(OS_RELEASE)))
82 MOZ_PKG_PLATFORM := BeOS-bone
83 else
84 ifeq (,$(filter-out 5.0.4, $(OS_RELEASE)))
85 MOZ_PKG_PLATFORM := BeOS-bone
86 else
87 ifeq (,$(filter-out 5.0, $(OS_RELEASE)))
88 MOZ_PKG_PLATFORM := BeOS-net_server
89 else
90 MOZ_PKG_PLATFORM := BeOS-$(OS_RELEASE)
91 endif # 5.0
92 endif # 5.0.4
93 endif # 5.1
94 endif # 6.
95 endif # OS_ARCH BeOS
96 endif #MOZ_PKG_PLATFORM
98 ifdef MOZ_PKG_SPECIAL
99 MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-$(MOZ_PKG_SPECIAL)
100 endif
102 MOZ_PKG_DIR = $(MOZ_APP_NAME)
104 ifndef MOZ_PKG_PRETTYNAMES # standard package names
106 ifndef MOZ_PKG_APPNAME
107 MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
108 endif
110 PKG_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
111 PKG_PATH =
112 PKG_INST_BASENAME = $(PKG_BASENAME).installer
113 PKG_INST_PATH = install/sea/
114 PKG_UPDATE_BASENAME = $(PKG_BASENAME)
115 PKG_UPDATE_PATH = update/
116 COMPLETE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).complete.mar
117 # PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
118 PARTIAL_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).partial.*.mar
119 PKG_LANGPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).langpack
120 PKG_LANGPACK_PATH = install/
121 LANGPACK = $(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
122 PKG_SRCPACK_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).source
123 PKG_SRCPACK_PATH =
125 else # "pretty" release package names
127 ifndef MOZ_PKG_APPNAME
128 MOZ_PKG_APPNAME = $(MOZ_APP_DISPLAYNAME)
129 endif
130 MOZ_PKG_APPNAME_LC = $(shell echo $(MOZ_PKG_APPNAME) | tr '[A-Z]' '[a-z]')
133 ifndef MOZ_PKG_LONGVERSION
134 MOZ_PKG_LONGVERSION = $(shell echo $(MOZ_PKG_VERSION) |\
135 sed -e 's/a\([0-9][0-9]*\)$$/ Alpha \1/' |\
136 sed -e 's/b\([0-9][0-9]*\)$$/ Beta \1/' |\
137 sed -e 's/rc\([0-9][0-9]*\)$$/ RC \1/')
138 endif
140 ifeq (,$(filter-out Darwin OS2, $(OS_ARCH))) # Mac and OS2
141 PKG_BASENAME = $(MOZ_PKG_APPNAME) $(MOZ_PKG_LONGVERSION)
142 PKG_INST_BASENAME = $(MOZ_PKG_APPNAME) Setup $(MOZ_PKG_LONGVERSION)
143 else
144 ifeq (,$(filter-out WINNT, $(OS_ARCH))) # Windows
145 PKG_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
146 PKG_INST_BASENAME = $(MOZ_PKG_APPNAME) Setup $(MOZ_PKG_LONGVERSION)
147 else # unix (actually, not Windows, Mac or OS/2)
148 PKG_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
149 PKG_INST_BASENAME = $(MOZ_PKG_APPNAME_LC)-setup-$(MOZ_PKG_VERSION)
150 endif
151 endif
152 PKG_PATH = $(MOZ_PKG_PLATFORM)/$(AB_CD)/
153 ifeq ($(MOZ_APP_NAME),xulrunner)
154 PKG_PATH = runtimes/
155 PKG_BASENAME = $(MOZ_APP_NAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
156 endif
157 PKG_INST_PATH = $(PKG_PATH)
158 PKG_UPDATE_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION)
159 PKG_UPDATE_PATH = update/$(PKG_PATH)
160 COMPLETE_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).complete.mar
161 # PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
162 PARTIAL_MAR = $(PKG_UPDATE_PATH)$(PKG_UPDATE_BASENAME).partial.*.mar
163 PKG_LANGPACK_BASENAME = $(AB_CD)
164 PKG_LANGPACK_PATH = $(MOZ_PKG_PLATFORM)/xpi/
165 LANGPACK = $(PKG_LANGPACK_PATH)$(PKG_LANGPACK_BASENAME).xpi
166 PKG_SRCPACK_BASENAME = $(MOZ_PKG_APPNAME_LC)-$(MOZ_PKG_VERSION).source
167 PKG_SRCPACK_PATH = source/
169 endif # MOZ_PKG_PRETTYNAMES
171 # Symbol package naming
172 SYMBOL_FULL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols-full
173 SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols
175 # Test package naming
176 TEST_PACKAGE = $(PKG_BASENAME).tests.zip
178 ifneq (,$(wildcard $(DIST)/bin/application.ini))
179 BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
180 else
181 BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
182 endif
184 MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))