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 MOZ_PKG_PLATFORM
:= win
$(MOZ_BITS
)
56 ifeq ($(OS_ARCH
),Darwin
)
57 MOZ_PKG_PLATFORM
:= mac
59 ifeq ($(TARGET_OS
),linux-gnu
)
60 MOZ_PKG_PLATFORM
:= linux-
$(TARGET_CPU
)
63 MOZ_PKG_PLATFORM
:= os2
65 ifeq ($(OS_ARCH
),BeOS
)
66 ifeq (,$(filter-out 6.
%, $(OS_RELEASE
)))
67 MOZ_PKG_PLATFORM
:= Zeta
69 ifeq (,$(filter-out 5.1, $(OS_RELEASE
)))
70 MOZ_PKG_PLATFORM
:= BeOS-bone
72 ifeq (,$(filter-out 5.0.4, $(OS_RELEASE
)))
73 MOZ_PKG_PLATFORM
:= BeOS-bone
75 ifeq (,$(filter-out 5.0, $(OS_RELEASE
)))
76 MOZ_PKG_PLATFORM
:= BeOS-net_server
78 MOZ_PKG_PLATFORM
:= BeOS-
$(OS_RELEASE
)
84 endif #MOZ_PKG_PLATFORM
87 MOZ_PKG_PLATFORM
:= $(MOZ_PKG_PLATFORM
)-$(MOZ_PKG_SPECIAL
)
91 ifndef MOZ_PKG_PRETTYNAMES
# standard package names
93 ifndef MOZ_PKG_APPNAME
94 MOZ_PKG_APPNAME
= $(MOZ_APP_NAME
)
97 PKG_BASENAME
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).
$(AB_CD
).
$(MOZ_PKG_PLATFORM
)
99 PKG_INST_BASENAME
= $(PKG_BASENAME
).installer
100 PKG_INST_PATH
= install/sea
/
101 PKG_UPDATE_BASENAME
= $(PKG_BASENAME
)
102 PKG_UPDATE_PATH
= update
/
103 PKG_LANGPACK_BASENAME
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).
$(AB_CD
).langpack
104 PKG_LANGPACK_PATH
= install/
105 PKG_SRCPACK_BASENAME
= $(MOZ_PKG_APPNAME
)-$(MOZ_PKG_VERSION
).source
108 else # "pretty" release package names
110 ifndef MOZ_PKG_APPNAME
111 MOZ_PKG_APPNAME
= $(MOZ_APP_DISPLAYNAME
)
113 MOZ_PKG_APPNAME_LC
= $(shell echo
$(MOZ_PKG_APPNAME
) | tr
'[A-Z]' '[a-z]')
116 ifndef MOZ_PKG_LONGVERSION
117 MOZ_PKG_LONGVERSION
= $(shell echo
$(MOZ_PKG_VERSION
) |\
118 sed
-e
's/a\([0-9][0-9]*\)$$/ Alpha \1/' |\
119 sed
-e
's/b\([0-9][0-9]*\)$$/ Beta \1/' |\
120 sed
-e
's/rc\([0-9][0-9]*\)$$/ RC \1/')
123 ifeq (,$(filter-out Darwin OS2
, $(OS_ARCH
))) # Mac and OS2
124 PKG_BASENAME
= $(MOZ_PKG_APPNAME
) $(MOZ_PKG_LONGVERSION
)
125 PKG_INST_BASENAME
= $(MOZ_PKG_APPNAME
) Setup
$(MOZ_PKG_LONGVERSION
)
127 ifeq (,$(filter-out WINNT
, $(OS_ARCH
))) # Windows
128 PKG_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
)
129 PKG_INST_BASENAME
= $(MOZ_PKG_APPNAME
) Setup
$(MOZ_PKG_LONGVERSION
)
130 else # unix (actually, not Windows, Mac or OS/2)
131 PKG_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
)
132 PKG_INST_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-setup-
$(MOZ_PKG_VERSION
)
135 PKG_PATH
= $(MOZ_PKG_PLATFORM
)/$(AB_CD
)/
136 PKG_INST_PATH
= $(PKG_PATH
)
137 PKG_UPDATE_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
)
138 PKG_UPDATE_PATH
= update
/$(PKG_PATH
)
139 PKG_LANGPACK_BASENAME
= $(AB_CD
)
140 PKG_LANGPACK_PATH
= langpack
/
141 PKG_SRCPACK_BASENAME
= $(MOZ_PKG_APPNAME_LC
)-$(MOZ_PKG_VERSION
).source
142 PKG_SRCPACK_PATH
= source
/
144 endif # MOZ_PKG_PRETTYNAMES