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
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.
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
)
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
)
57 MOZ_PKG_PLATFORM
:= win32
60 ifeq ($(OS_ARCH
),Darwin
)
61 MOZ_PKG_PLATFORM
:= mac
63 ifeq ($(TARGET_OS
),linux-gnu
)
64 MOZ_PKG_PLATFORM
:= linux-
$(TARGET_CPU
)
67 MOZ_PKG_PLATFORM
:= os2
69 ifeq ($(OS_ARCH
),BeOS
)
70 ifeq (,$(filter-out 6.
%, $(OS_RELEASE
)))
71 MOZ_PKG_PLATFORM
:= Zeta
73 ifeq (,$(filter-out 5.1, $(OS_RELEASE
)))
74 MOZ_PKG_PLATFORM
:= BeOS-bone
76 ifeq (,$(filter-out 5.0.4, $(OS_RELEASE
)))
77 MOZ_PKG_PLATFORM
:= BeOS-bone
79 ifeq (,$(filter-out 5.0, $(OS_RELEASE
)))
80 MOZ_PKG_PLATFORM
:= BeOS-net_server
82 MOZ_PKG_PLATFORM
:= BeOS-
$(OS_RELEASE
)
88 endif #MOZ_PKG_PLATFORM
91 MOZ_PKG_PLATFORM
:= $(MOZ_PKG_PLATFORM
)-$(MOZ_PKG_SPECIAL
)
94 MOZ_PKG_DIR
= $(MOZ_APP_NAME
)
96 ifndef MOZ_PKG_PRETTYNAMES
# standard package names
98 ifndef MOZ_PKG_APPNAME
99 MOZ_PKG_APPNAME
= $(MOZ_APP_NAME
)
102 PKG_BASENAME
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).
$(AB_CD
).
$(MOZ_PKG_PLATFORM
)
104 PKG_INST_BASENAME
= $(PKG_BASENAME
).installer
105 PKG_INST_PATH
= install/sea
/
106 PKG_UPDATE_BASENAME
= $(PKG_BASENAME
)
107 PKG_UPDATE_PATH
= update
/
108 COMPLETE_MAR
= $(PKG_UPDATE_PATH
)$(PKG_UPDATE_BASENAME
).complete.mar
109 # PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
110 PARTIAL_MAR
= $(PKG_UPDATE_PATH
)$(PKG_UPDATE_BASENAME
).partial.
*.mar
111 PKG_LANGPACK_BASENAME
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).
$(AB_CD
).langpack
112 PKG_LANGPACK_PATH
= install/
113 LANGPACK
= $(PKG_LANGPACK_PATH
)$(PKG_LANGPACK_BASENAME
).xpi
114 PKG_SRCPACK_BASENAME
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).source
117 else # "pretty" release package names
119 ifndef MOZ_PKG_APPNAME
120 MOZ_PKG_APPNAME
= $(MOZ_APP_DISPLAYNAME
)
122 MOZ_PKG_APPNAME_LC
= $(shell echo
$(MOZ_PKG_APPNAME
) | tr
'[A-Z]' '[a-z]')
125 ifndef MOZ_PKG_LONGVERSION
126 MOZ_PKG_LONGVERSION
= $(shell echo
$(MOZ_PKG_VERSION
) |\
127 sed
-e
's/a\([0-9][0-9]*\)$$/ Alpha \1/' |\
128 sed
-e
's/b\([0-9][0-9]*\)$$/ Beta \1/' |\
129 sed
-e
's/rc\([0-9][0-9]*\)$$/ RC \1/')
132 ifeq (,$(filter-out Darwin OS2
, $(OS_ARCH
))) # Mac and OS2
133 PKG_BASENAME
= $(MOZ_PKG_APPNAME
) $(MOZ_PKG_LONGVERSION
)
134 PKG_INST_BASENAME
= $(MOZ_PKG_APPNAME
) Setup
$(MOZ_PKG_LONGVERSION
)
136 ifeq (,$(filter-out WINNT
, $(OS_ARCH
))) # Windows
137 PKG_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
)
138 PKG_INST_BASENAME
= $(MOZ_PKG_APPNAME
) Setup
$(MOZ_PKG_LONGVERSION
)
139 else # unix (actually, not Windows, Mac or OS/2)
140 PKG_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
)
141 PKG_INST_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-setup-
$(MOZ_PKG_VERSION
)
144 PKG_PATH
= $(MOZ_PKG_PLATFORM
)/$(AB_CD
)/
145 ifeq ($(MOZ_APP_NAME
),xulrunner
)
147 PKG_BASENAME
= $(MOZ_APP_NAME
)-$(MOZ_PKG_VERSION
).
$(AB_CD
).
$(MOZ_PKG_PLATFORM
)
149 PKG_INST_PATH
= $(PKG_PATH
)
150 PKG_UPDATE_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
)
151 PKG_UPDATE_PATH
= update
/$(PKG_PATH
)
152 COMPLETE_MAR
= $(PKG_UPDATE_PATH
)$(PKG_UPDATE_BASENAME
).complete.mar
153 # PARTIAL_MAR needs to be processed by $(wildcard) before you use it.
154 PARTIAL_MAR
= $(PKG_UPDATE_PATH
)$(PKG_UPDATE_BASENAME
).partial.
*.mar
155 PKG_LANGPACK_BASENAME
= $(AB_CD
)
156 PKG_LANGPACK_PATH
= $(MOZ_PKG_PLATFORM
)/xpi
/
157 LANGPACK
= $(PKG_LANGPACK_PATH
)$(PKG_LANGPACK_BASENAME
).xpi
158 PKG_SRCPACK_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
).source
159 PKG_SRCPACK_PATH
= source
/
161 endif # MOZ_PKG_PRETTYNAMES
163 # Symbol package naming
164 SYMBOL_ARCHIVE_BASENAME
= $(PKG_BASENAME
).crashreporter-symbols
166 # Test package naming
167 TEST_PACKAGE
= $(PKG_BASENAME
).tests.
tar.bz2
169 ifneq (,$(wildcard $(DIST
)/bin
/application.ini
))
170 BUILDID
= $(shell $(PYTHON
) $(MOZILLA_DIR
)/config
/printconfigsetting.py
$(DIST
)/bin
/application.ini App BuildID
)
172 BUILDID
= $(shell $(PYTHON
) $(MOZILLA_DIR
)/config
/printconfigsetting.py
$(DIST
)/bin
/platform.ini Build BuildID
)
175 MOZ_SOURCE_STAMP
= $(shell hg
-R
$(topsrcdir
) parent
--template
="{node|short}\n" 2>/dev
/null
)