Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / toolkit / mozapps / installer / package-name.mk
blobf1f5048337eea21facf06bb7c46af0d5f8418aa1
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 MOZ_PKG_PLATFORM := win$(MOZ_BITS)
55 endif
56 ifeq ($(OS_ARCH),Darwin)
57 MOZ_PKG_PLATFORM := mac
58 endif
59 ifeq ($(TARGET_OS),linux-gnu)
60 MOZ_PKG_PLATFORM := linux-$(TARGET_CPU)
61 endif
62 ifeq ($(OS_ARCH),OS2)
63 MOZ_PKG_PLATFORM := os2
64 endif
65 ifeq ($(OS_ARCH),BeOS)
66 ifeq (,$(filter-out 6.%, $(OS_RELEASE)))
67 MOZ_PKG_PLATFORM := Zeta
68 else
69 ifeq (,$(filter-out 5.1, $(OS_RELEASE)))
70 MOZ_PKG_PLATFORM := BeOS-bone
71 else
72 ifeq (,$(filter-out 5.0.4, $(OS_RELEASE)))
73 MOZ_PKG_PLATFORM := BeOS-bone
74 else
75 ifeq (,$(filter-out 5.0, $(OS_RELEASE)))
76 MOZ_PKG_PLATFORM := BeOS-net_server
77 else
78 MOZ_PKG_PLATFORM := BeOS-$(OS_RELEASE)
79 endif # 5.0
80 endif # 5.0.4
81 endif # 5.1
82 endif # 6.
83 endif # OS_ARCH BeOS
84 endif #MOZ_PKG_PLATFORM
86 ifdef MOZ_PKG_SPECIAL
87 MOZ_PKG_PLATFORM := $(MOZ_PKG_PLATFORM)-$(MOZ_PKG_SPECIAL)
88 endif
91 ifndef MOZ_PKG_PRETTYNAMES # standard package names
93 ifndef MOZ_PKG_APPNAME
94 MOZ_PKG_APPNAME = $(MOZ_APP_NAME)
95 endif
97 PKG_BASENAME = $(MOZ_PKG_APPNAME)-$(MOZ_PKG_VERSION).$(AB_CD).$(MOZ_PKG_PLATFORM)
98 PKG_PATH =
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
106 PKG_SRCPACK_PATH =
108 else # "pretty" release package names
110 ifndef MOZ_PKG_APPNAME
111 MOZ_PKG_APPNAME = $(MOZ_APP_DISPLAYNAME)
112 endif
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/')
121 endif
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)
126 else
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)
133 endif
134 endif
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