author | Wolfgang Rosenauer <wr@rosenauer.org> |
Sun, 27 Apr 2014 18:01:48 +0200 | |
branch | esr24 |
changeset 728 | 6820714d53f4 |
parent 713 | 3c7719dfcafa |
child 743 | d43937f702f4 |
permissions | -rw-r--r-- |
674 | 1 |
# |
2 |
# spec file for package firefox-esr |
|
3 |
# |
|
702 | 4 |
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. |
5 |
# 2006-2014 Wolfgang Rosenauer |
|
674 | 6 |
# |
7 |
# All modifications and additions to the file contributed by third parties |
|
8 |
# remain the property of their copyright owners, unless otherwise agreed |
|
9 |
# upon. The license for this file, and modifications and additions to the |
|
10 |
# file, is the same license as for the pristine package itself (unless the |
|
11 |
# license for the pristine package is not an Open Source License, in which |
|
12 |
# case the license is the MIT License). An "Open Source License" is a |
|
13 |
# license that conforms to the Open Source Definition (Version 1.9) |
|
14 |
# published by the Open Source Initiative. |
|
15 |
||
16 |
# Please submit bugfixes or comments via http://bugs.opensuse.org/ |
|
17 |
# |
|
18 |
||
19 |
||
20 |
%define major 24 |
|
728 | 21 |
%define mainver %major.5.0 |
674 | 22 |
%define update_channel release |
23 |
||
24 |
%define gstreamer_ver 0.10 |
|
25 |
||
26 |
Name: firefox-esr |
|
27 |
BuildRequires: Mesa-devel |
|
28 |
BuildRequires: autoconf213 |
|
29 |
BuildRequires: dbus-1-glib-devel |
|
30 |
BuildRequires: fdupes |
|
31 |
BuildRequires: gcc-c++ |
|
32 |
BuildRequires: libcurl-devel |
|
33 |
BuildRequires: libgnomeui-devel |
|
34 |
BuildRequires: libidl-devel |
|
35 |
BuildRequires: libnotify-devel |
|
36 |
BuildRequires: python |
|
37 |
BuildRequires: startup-notification-devel |
|
38 |
BuildRequires: unzip |
|
39 |
BuildRequires: update-desktop-files |
|
40 |
BuildRequires: xorg-x11-libXt-devel |
|
41 |
BuildRequires: yasm |
|
42 |
BuildRequires: zip |
|
43 |
%if %suse_version > 1110 |
|
44 |
BuildRequires: libiw-devel |
|
45 |
BuildRequires: libproxy-devel |
|
46 |
%else |
|
47 |
BuildRequires: wireless-tools |
|
48 |
%endif |
|
687 | 49 |
BuildRequires: mozilla-nspr-devel >= 4.10.2 |
702 | 50 |
BuildRequires: mozilla-nss-devel >= 3.15.4 |
674 | 51 |
BuildRequires: nss-shared-helper-devel |
52 |
%if %suse_version > 1210 |
|
53 |
BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) |
|
54 |
BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) |
|
55 |
BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver) |
|
56 |
Requires: libgstreamer-0_10-0 |
|
57 |
Recommends: gstreamer-0_10-fluendo-mp3 |
|
58 |
Recommends: gstreamer-0_10-plugins-ffmpeg |
|
59 |
%endif |
|
60 |
Version: %{mainver} |
|
61 |
Release: 0 |
|
728 | 62 |
%define releasedate 2014042400 |
674 | 63 |
Provides: firefox-esr = %{mainver} |
64 |
Provides: firefox-esr = %{version}-%{release} |
|
65 |
Provides: web_browser |
|
66 |
Provides: browser(npapi) |
|
67 |
# this is needed to match this package with the kde4 helper package without the main package |
|
68 |
# having a hard requirement on the kde4 package |
|
69 |
%define kde_helper_version 6 |
|
70 |
Provides: mozilla-kde4-version = %{kde_helper_version} |
|
71 |
Conflicts: firefox |
|
72 |
# replace older MozillaFirefox packages for dists up to 11.2 |
|
73 |
%if %suse_version < 1130 |
|
74 |
Provides: MozillaFirefox = %{version} |
|
75 |
Obsoletes: MozillaFirefox < %{version} |
|
76 |
%else |
|
77 |
Conflicts: MozillaFirefox |
|
78 |
%endif |
|
79 |
Summary: Mozilla Firefox Web Browser ESR |
|
80 |
License: MPL-2.0 |
|
81 |
Group: Productivity/Networking/Web/Browsers |
|
82 |
Url: http://www.mozilla.org/ |
|
83 |
Source: firefox-%{version}-source.tar.bz2 |
|
84 |
Source1: MozillaFirefox.desktop |
|
85 |
Source2: MozillaFirefox-rpmlintrc |
|
86 |
Source3: mozilla.sh.in |
|
87 |
Source4: find-external-requires.sh |
|
88 |
Source5: source-stamp.txt |
|
89 |
Source6: kde.js |
|
90 |
Source7: l10n-%{version}.tar.bz2 |
|
91 |
Source8: firefox-mimeinfo.xml |
|
92 |
Source9: firefox.js |
|
93 |
Source10: compare-locales.tar.bz2 |
|
94 |
Source11: firefox.1 |
|
95 |
Source12: mozilla-get-app-id |
|
96 |
Source13: add-plugins.sh.in |
|
97 |
Source14: create-tar.sh |
|
98 |
Source15: gecko.js |
|
99 |
# Gecko/Toolkit |
|
100 |
Patch1: toolkit-download-folder.patch |
|
101 |
Patch2: mozilla-nongnome-proxies.patch |
|
102 |
Patch3: mozilla-prefer_plugin_pref.patch |
|
103 |
Patch4: mozilla-shared-nss-db.patch |
|
104 |
Patch5: mozilla-kde.patch |
|
105 |
Patch6: mozilla-preferences.patch |
|
106 |
Patch7: mozilla-language.patch |
|
107 |
Patch8: mozilla-ntlm-full-path.patch |
|
108 |
Patch9: mozilla-repo.patch |
|
109 |
Patch10: mozilla-sle11.patch |
|
110 |
Patch12: mozilla-arm-disable-edsp.patch |
|
111 |
Patch13: mozilla-ppc.patch |
|
112 |
Patch14: mozilla-libproxy-compat.patch |
|
113 |
# Firefox/browser |
|
114 |
Patch30: firefox-browser-css.patch |
|
115 |
Patch31: firefox-kde.patch |
|
116 |
Patch32: firefox-kde-114.patch |
|
117 |
Patch33: firefox-no-default-ualocale.patch |
|
118 |
Patch34: firefox-multilocale-chrome.patch |
|
119 |
Patch35: firefox-branded-icons.patch |
|
120 |
BuildRoot: %{_tmppath}/%{name}-%{version}-build |
|
121 |
Requires(post): coreutils shared-mime-info desktop-file-utils |
|
122 |
Requires(postun): shared-mime-info desktop-file-utils |
|
123 |
Requires: %{name}-branding > 20.0 |
|
124 |
Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) |
|
125 |
Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) |
|
126 |
Recommends: libcanberra0 |
|
127 |
# libproxy's mozjs pacrunner crashes FF (bnc#759123) |
|
128 |
%if %suse_version < 1220 |
|
129 |
Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 |
|
130 |
%endif |
|
131 |
%define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
|
132 |
%define _use_internal_dependency_generator 0 |
|
133 |
%define __find_requires sh %{SOURCE4} |
|
134 |
%global provfind sh -c "grep -v '.so' | %__find_provides" |
|
135 |
%global __find_provides %provfind |
|
136 |
%define progname firefox |
|
137 |
%define progdir %{_prefix}/%_lib/%{progname} |
|
138 |
%define gnome_dir %{_prefix} |
|
139 |
%if %suse_version > 1130 |
|
140 |
%define desktop_file_name firefox |
|
141 |
%else |
|
142 |
%define desktop_file_name %{name} |
|
143 |
%endif |
|
144 |
### build options |
|
706
4639b5ad4fce
Google API key inclusion
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
702
diff
changeset
|
145 |
# Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
4639b5ad4fce
Google API key inclusion
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
702
diff
changeset
|
146 |
# Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
4639b5ad4fce
Google API key inclusion
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
702
diff
changeset
|
147 |
# please get your own set of keys. |
4639b5ad4fce
Google API key inclusion
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
702
diff
changeset
|
148 |
%define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q |
674 | 149 |
%define branding 1 |
150 |
%define localize 1 |
|
151 |
%ifarch ppc ppc64 s390 s390x ia64 %arm |
|
152 |
%define crashreporter 0 |
|
153 |
%else |
|
154 |
%define crashreporter 1 |
|
155 |
%endif |
|
156 |
### build options end |
|
157 |
||
158 |
%description |
|
159 |
Mozilla Firefox is a standalone web browser, designed for standards |
|
160 |
compliance and performance. Its functionality can be enhanced via a |
|
161 |
plethora of extensions. |
|
162 |
||
163 |
%package devel |
|
164 |
Summary: Devel package for Firefox |
|
165 |
Group: Development/Tools/Other |
|
166 |
Provides: firefox-devel = %{version}-%{release} |
|
167 |
Requires: %{name} = %{version} |
|
168 |
Requires: perl(Archive::Zip) |
|
169 |
Requires: perl(XML::Simple) |
|
170 |
||
171 |
%description devel |
|
172 |
Development files for Firefox to make packaging of addons easier. |
|
173 |
||
174 |
%if %localize |
|
175 |
||
176 |
%package translations-common |
|
177 |
Summary: Common translations for Firefox |
|
178 |
Group: System/Localization |
|
179 |
Provides: locale(%{name}:ar;ca;cs;da;de;en_GB;el;es_AR;es_CL;es_ES;fi;fr;hu;it;ja;ko;nb_NO;nl;pl;pt_BR;pt_PT;ru;sv_SE;zh_CN;zh_TW) |
|
180 |
Requires: %{name} = %{version} |
|
181 |
Obsoletes: %{name}-translations < %{version}-%{release} |
|
182 |
%if %suse_version < 1130 |
|
183 |
Provides: MozillaFirefox-translations-common = %{version} |
|
184 |
Obsoletes: MozillaFirefox-translations-common < %{version} |
|
185 |
%else |
|
186 |
Conflicts: MozillaFirefox-translations-common |
|
187 |
%endif |
|
188 |
||
189 |
%description translations-common |
|
190 |
This package contains several common languages for the user interface |
|
191 |
of Firefox. |
|
192 |
||
193 |
%package translations-other |
|
194 |
Summary: Extra translations for Firefox |
|
195 |
Group: System/Localization |
|
196 |
Provides: locale(%{name}:ach;af;ak;as;ast;be;bg;bn_BD;bn_IN;br;bs;csb;cy;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gu_IN;he;hi_IN;hr;hy_AM;id;is;kk;km;kn;ku;lg;lij;lt;lv;mai;mk;ml;mr;nn_NO;nso;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;ta_LK;te;th;tr;uk;vi;zu) |
|
197 |
Requires: %{name} = %{version} |
|
198 |
Obsoletes: %{name}-translations < %{version}-%{release} |
|
199 |
%if %suse_version < 1130 |
|
200 |
Provides: MozillaFirefox-translations-other = %{version} |
|
201 |
Obsoletes: MozillaFirefox-translations-other < %{version} |
|
202 |
%else |
|
203 |
Conflicts: MozillaFirefox-translations-other |
|
204 |
%endif |
|
205 |
||
206 |
%description translations-other |
|
207 |
This package contains rarely used languages for the user interface |
|
208 |
of Firefox. |
|
209 |
%endif |
|
210 |
||
211 |
%package branding-upstream |
|
212 |
Summary: Upstream branding for Firefox |
|
213 |
Group: Productivity/Networking/Web/Browsers |
|
214 |
Provides: %{name}-branding = %{version} |
|
215 |
Conflicts: otherproviders(%{name}-branding) |
|
216 |
Conflicts: otherproviders(MozillaFirefox-branding) |
|
217 |
Supplements: packageand(%{name}:branding-upstream) |
|
218 |
#BRAND: Provide three files - |
|
219 |
#BRAND: /usr/lib/firefox/browserconfig.properties that contains the |
|
220 |
#BRAND: default homepage and some other default configuration options |
|
221 |
#BRAND: /usr/lib/firefox/defaults/profile/bookmarks.html that contains |
|
222 |
#BRAND: the list of default bookmarks |
|
223 |
#BRAND: It's also possible to create a file |
|
224 |
#BRAND: /usr/lib/firefox/defaults/preferences/firefox-$vendor.js to set |
|
225 |
#BRAND: custom preference overrides. |
|
226 |
#BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins |
|
227 |
||
228 |
%description branding-upstream |
|
229 |
This package provides upstream look and feel for Firefox. |
|
230 |
||
231 |
||
232 |
%if %crashreporter |
|
233 |
||
234 |
%package buildsymbols |
|
235 |
Summary: Breakpad buildsymbols for %{name} |
|
236 |
Group: Development/Debug |
|
237 |
||
238 |
%description buildsymbols |
|
239 |
This subpackage contains the Breakpad created and compatible debugging |
|
240 |
symbols meant for upload to Mozilla's crash collector database. |
|
241 |
%endif |
|
242 |
||
243 |
%prep |
|
244 |
%setup -q -n mozilla -b 7 -b 10 |
|
245 |
cd $RPM_BUILD_DIR/mozilla |
|
246 |
%patch1 -p1 |
|
247 |
%patch2 -p1 |
|
248 |
%patch3 -p1 |
|
249 |
%patch4 -p1 |
|
250 |
%patch5 -p1 |
|
251 |
%patch6 -p1 |
|
252 |
%patch7 -p1 |
|
253 |
%patch8 -p1 |
|
254 |
%patch9 -p1 |
|
255 |
%if %suse_version < 1120 |
|
256 |
%patch10 -p1 |
|
257 |
%endif |
|
258 |
%patch12 -p1 |
|
259 |
%patch13 -p1 |
|
260 |
%patch14 -p1 |
|
261 |
# |
|
262 |
%patch30 -p1 |
|
263 |
%if %suse_version >= 1110 |
|
264 |
%patch31 -p1 |
|
265 |
%endif |
|
266 |
%if %suse_version >= 1140 |
|
267 |
%patch32 -p1 |
|
268 |
%endif |
|
269 |
%patch33 -p1 |
|
270 |
%patch34 -p1 |
|
271 |
%patch35 -p1 |
|
272 |
||
273 |
%build |
|
274 |
# no need to add build time to binaries |
|
275 |
modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" |
|
276 |
DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
|
277 |
TIME="\"$(date -d "${modified}" "+%%R")\"" |
|
278 |
find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
|
279 |
# |
|
280 |
kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
|
281 |
if test "$kdehelperversion" != %{kde_helper_version}; then |
|
282 |
echo fix kde helper version in the .spec file |
|
283 |
exit 1 |
|
284 |
fi |
|
285 |
source %{SOURCE5} |
|
286 |
export MOZ_SOURCE_STAMP=$REV |
|
287 |
export SOURCE_REPO=$REPO |
|
288 |
export source_repo=$REPO |
|
289 |
export MOZ_SOURCE_REPO=$REPO |
|
290 |
export MOZ_BUILD_DATE=%{releasedate} |
|
291 |
export MOZILLA_OFFICIAL=1 |
|
292 |
export BUILD_OFFICIAL=1 |
|
293 |
export MOZ_TELEMETRY_REPORTING=1 |
|
706
4639b5ad4fce
Google API key inclusion
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
702
diff
changeset
|
294 |
export MOZ_GOOGLE_API_KEY=%{_google_api_key} |
674 | 295 |
export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" |
296 |
%ifarch %arm |
|
297 |
export CFLAGS="${CFLAGS/-g / }" |
|
298 |
%endif |
|
299 |
%ifarch ppc64 |
|
300 |
export CFLAGS="$CFLAGS -mminimal-toc" |
|
301 |
%endif |
|
302 |
export CXXFLAGS="$CFLAGS" |
|
303 |
export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
|
304 |
cat << EOF > $MOZCONFIG |
|
305 |
mk_add_options MOZILLA_OFFICIAL=1 |
|
306 |
mk_add_options BUILD_OFFICIAL=1 |
|
307 |
mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
|
308 |
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
|
309 |
. \$topsrcdir/browser/config/mozconfig |
|
310 |
ac_add_options --prefix=%{_prefix} |
|
311 |
ac_add_options --libdir=%{_libdir} |
|
312 |
ac_add_options --sysconfdir=%{_sysconfdir} |
|
313 |
ac_add_options --mandir=%{_mandir} |
|
314 |
ac_add_options --includedir=%{_includedir} |
|
315 |
ac_add_options --with-system-nspr |
|
316 |
ac_add_options --with-system-nss |
|
317 |
ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
|
318 |
#ac_add_options --with-system-jpeg # libjpeg-turbo is used internally |
|
319 |
#ac_add_options --with-system-png # doesn't work because of missing APNG support |
|
320 |
ac_add_options --with-system-zlib |
|
321 |
ac_add_options --disable-installer |
|
322 |
ac_add_options --disable-updater |
|
323 |
ac_add_options --disable-tests |
|
324 |
ac_add_options --disable-debug |
|
325 |
ac_add_options --enable-startup-notification |
|
326 |
#ac_add_options --enable-chrome-format=jar |
|
327 |
ac_add_options --enable-update-channel=%{update_channel} |
|
328 |
EOF |
|
329 |
%if %suse_version > 1130 |
|
330 |
cat << EOF >> $MOZCONFIG |
|
331 |
ac_add_options --disable-gnomevfs |
|
332 |
ac_add_options --enable-gio |
|
333 |
EOF |
|
334 |
%endif |
|
335 |
%if %suse_version < 1220 |
|
336 |
cat << EOF >> $MOZCONFIG |
|
337 |
ac_add_options --disable-gstreamer |
|
338 |
EOF |
|
339 |
%endif |
|
340 |
%if %branding |
|
341 |
cat << EOF >> $MOZCONFIG |
|
342 |
ac_add_options --enable-official-branding |
|
343 |
EOF |
|
344 |
%endif |
|
345 |
%if %suse_version > 1110 |
|
346 |
cat << EOF >> $MOZCONFIG |
|
347 |
ac_add_options --enable-libproxy |
|
348 |
EOF |
|
349 |
%endif |
|
350 |
%if ! %crashreporter |
|
351 |
cat << EOF >> $MOZCONFIG |
|
352 |
ac_add_options --disable-crashreporter |
|
353 |
EOF |
|
354 |
%endif |
|
355 |
# Disable neon for arm as it does not build correctly |
|
356 |
%ifarch %arm |
|
357 |
cat << EOF >> $MOZCONFIG |
|
358 |
ac_add_options --disable-neon |
|
359 |
EOF |
|
360 |
%endif |
|
361 |
%ifnarch %ix86 x86_64 |
|
362 |
cat << EOF >> $MOZCONFIG |
|
363 |
ac_add_options --disable-webrtc |
|
364 |
EOF |
|
365 |
%endif |
|
366 |
make -f client.mk build |
|
367 |
||
368 |
%install |
|
369 |
cd $RPM_BUILD_DIR/obj |
|
370 |
source %{SOURCE5} |
|
371 |
export MOZ_SOURCE_STAMP=$REV |
|
372 |
export MOZ_SOURCE_REPO=$REPO |
|
373 |
make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
|
374 |
#DEBUG (break the build if searchplugins are missing / temporary) |
|
375 |
grep amazondotcom dist/firefox/browser/omni.ja |
|
376 |
# copy tree into RPM_BUILD_ROOT |
|
377 |
mkdir -p $RPM_BUILD_ROOT%{progdir} |
|
378 |
cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* $RPM_BUILD_ROOT%{progdir} |
|
379 |
mkdir -p $RPM_BUILD_ROOT%{progdir}/distribution/extensions |
|
380 |
mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/searchplugins |
|
381 |
mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/ |
|
382 |
# install kde.js |
|
383 |
%if %suse_version >= 1110 |
|
384 |
install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/kde.js |
|
385 |
install -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/firefox.js |
|
386 |
%endif |
|
387 |
# core configuration (e.g. temporary gstreamer pref) |
|
388 |
# this is expected to be just temporary and therefore not handled in openSUSE branding |
|
389 |
install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{progdir}/defaults/pref/gecko.js |
|
390 |
# install add-plugins.sh |
|
391 |
sed "s:%%PROGDIR:%{progdir}:g" \ |
|
392 |
%{SOURCE13} > $RPM_BUILD_ROOT%{progdir}/add-plugins.sh |
|
393 |
chmod 755 $RPM_BUILD_ROOT%{progdir}/add-plugins.sh |
|
394 |
# install additional locales |
|
395 |
%if %localize |
|
396 |
rm -f %{_tmppath}/translations.* |
|
397 |
touch %{_tmppath}/translations.{common,other} |
|
398 |
for locale in $(awk '{ print $1; }' ../mozilla/browser/locales/shipped-locales); do |
|
399 |
case $locale in |
|
400 |
ja-JP-mac|en-US) |
|
401 |
;; |
|
402 |
*) |
|
403 |
pushd $RPM_BUILD_DIR/compare-locales |
|
404 |
PYTHONPATH=lib \ |
|
405 |
scripts/compare-locales -m ../l10n-merged/$locale \ |
|
406 |
../mozilla/browser/locales/l10n.ini ../l10n $locale |
|
407 |
popd |
|
408 |
LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ |
|
409 |
make -C browser/locales langpack-$locale |
|
410 |
cp -rL dist/xpi-stage/locale-$locale \ |
|
411 |
$RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org |
|
412 |
# remove prefs, profile defaults, and hyphenation from langpack |
|
413 |
rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
|
414 |
rm -rf $RPM_BUILD_ROOT%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
|
415 |
# check against the fixed common list and sort into the right filelist |
|
416 |
_matched=0 |
|
417 |
for _match in ar ca cs da de en-GB el es-AR es-CL es-ES fi fr hu it ja ko nb-NO nl pl pt-BR pt-PT ru sv-SE zh-CN zh-TW; do |
|
418 |
[ "$_match" = "$locale" ] && _matched=1 |
|
419 |
done |
|
420 |
[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
|
421 |
echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
|
422 |
>> %{_tmppath}/translations.$_l10ntarget |
|
423 |
esac |
|
424 |
done |
|
425 |
%endif |
|
426 |
# remove some executable permissions |
|
427 |
find $RPM_BUILD_ROOT%{progdir} \ |
|
428 |
-name "*.js" -o \ |
|
429 |
-name "*.jsm" -o \ |
|
430 |
-name "*.rdf" -o \ |
|
431 |
-name "*.properties" -o \ |
|
432 |
-name "*.dtd" -o \ |
|
433 |
-name "*.txt" -o \ |
|
434 |
-name "*.xml" -o \ |
|
435 |
-name "*.css" | xargs chmod a-x |
|
436 |
# remove mkdir.done files from installed base |
|
437 |
find $RPM_BUILD_ROOT%{progdir} -name ".mkdir.done" | xargs rm |
|
438 |
# overwrite the mozilla start-script and link it to /usr/bin |
|
439 |
mkdir --parents $RPM_BUILD_ROOT/usr/bin |
|
440 |
sed "s:%%PREFIX:%{_prefix}:g |
|
441 |
s:%%PROGDIR:%{progdir}:g |
|
442 |
s:%%APPNAME:firefox:g |
|
443 |
s:%%PROFILE:.mozilla/firefox:g" \ |
|
444 |
%{SOURCE3} > $RPM_BUILD_ROOT%{progdir}/%{progname}.sh |
|
445 |
chmod 755 $RPM_BUILD_ROOT%{progdir}/%{progname}.sh |
|
446 |
ln -sf ../..%{progdir}/%{progname}.sh $RPM_BUILD_ROOT%{_bindir}/%{progname} |
|
447 |
# desktop definition |
|
448 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications |
|
449 |
install -m 644 %{SOURCE1} \ |
|
450 |
$RPM_BUILD_ROOT%{_datadir}/applications/%{desktop_file_name}.desktop |
|
451 |
# additional mime-types |
|
452 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mime/packages |
|
453 |
cp %{SOURCE8} $RPM_BUILD_ROOT%{_datadir}/mime/packages/%{progname}.xml |
|
454 |
# install man-page |
|
455 |
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ |
|
456 |
cp %{SOURCE11} $RPM_BUILD_ROOT%{_mandir}/man1/%{progname}.1 |
|
457 |
########## |
|
458 |
# ADDONS |
|
459 |
# |
|
460 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/extensions/%{firefox_appid} |
|
461 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/mozilla/extensions/%{firefox_appid} |
|
462 |
mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps/ |
|
463 |
ln -sf %{progdir}/browser/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}.png |
|
464 |
ln -sf %{progdir}/browser/icons/mozicon128.png $RPM_BUILD_ROOT/usr/share/pixmaps/%{progname}-gnome.png |
|
465 |
%if %branding |
|
466 |
for size in 16 22 24 32 48 256; do |
|
467 |
%else |
|
468 |
for size in 16 32 48; do |
|
469 |
%endif |
|
470 |
mkdir -p $RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/ |
|
471 |
ln -sf %{progdir}/browser/chrome/icons/default/default$size.png \ |
|
472 |
$RPM_BUILD_ROOT%{gnome_dir}/share/icons/hicolor/${size}x${size}/apps/%{progname}.png |
|
473 |
done |
|
474 |
%suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK |
|
475 |
# excludes |
|
476 |
rm -f $RPM_BUILD_ROOT%{progdir}/updater.ini |
|
477 |
rm -f $RPM_BUILD_ROOT%{progdir}/removed-files |
|
478 |
rm -f $RPM_BUILD_ROOT%{progdir}/README.txt |
|
479 |
rm -f $RPM_BUILD_ROOT%{progdir}/old-homepage-default.properties |
|
480 |
rm -f $RPM_BUILD_ROOT%{progdir}/run-mozilla.sh |
|
481 |
rm -f $RPM_BUILD_ROOT%{progdir}/LICENSE |
|
482 |
rm -f $RPM_BUILD_ROOT%{progdir}/precomplete |
|
483 |
rm -f $RPM_BUILD_ROOT%{progdir}/dictionaries/en-US* |
|
484 |
rm -f $RPM_BUILD_ROOT%{progdir}/update-settings.ini |
|
485 |
# devel |
|
486 |
mkdir -p %{buildroot}%{_bindir} |
|
487 |
install -m 755 %SOURCE12 %{buildroot}%{_bindir} |
|
488 |
# inspired by mandriva |
|
489 |
mkdir -p %{buildroot}/etc/rpm |
|
490 |
cat <<'FIN' >%{buildroot}/etc/rpm/macros.%{progname} |
|
491 |
# Macros from %{name} package |
|
492 |
%%firefox_major %{major} |
|
493 |
%%firefox_version %{version} |
|
494 |
%%firefox_mainver %{mainver} |
|
495 |
%%firefox_mozillapath %%{_libdir}/%{progname} |
|
496 |
%%firefox_pluginsdir %%{_libdir}/browser-plugins |
|
497 |
%%firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
|
498 |
%%firefox_extdir %%(if [ "%%_target_cpu" = "noarch" ]; then echo %%{_datadir}/mozilla/extensions/%%{firefox_appid}; else echo %%{_libdir}/mozilla/extensions/%%{firefox_appid}; fi) |
|
499 |
||
500 |
%%firefox_ext_install() \ |
|
501 |
extdir="%%{buildroot}%%{firefox_extdir}/`mozilla-get-app-id '%%1'`" \ |
|
502 |
mkdir -p "$extdir" \ |
|
503 |
%%{__unzip} -q -d "$extdir" "%%1" \ |
|
504 |
%%{nil} |
|
505 |
FIN |
|
506 |
# just dumping an xpi file there doesn't work... |
|
507 |
#%%firefox_ext_install() \ |
|
508 |
# extdir="%%{buildroot}%%{firefox_extdir}" \ |
|
509 |
# mkdir -p "$extdir" \ |
|
510 |
# cp "%%1" "$extdir" \ |
|
511 |
# %%{nil} |
|
512 |
# fdupes |
|
513 |
%fdupes $RPM_BUILD_ROOT%{progdir} |
|
514 |
%fdupes $RPM_BUILD_ROOT%{_datadir} |
|
515 |
# create breakpad debugsymbols |
|
516 |
%if %crashreporter |
|
517 |
SYMBOLS_NAME="firefox-%{version}-%{release}.%{_arch}-%{suse_version}-symbols" |
|
518 |
make buildsymbols \ |
|
519 |
SYMBOL_INDEX_NAME="$SYMBOLS_NAME.txt" \ |
|
520 |
SYMBOL_FULL_ARCHIVE_BASENAME="$SYMBOLS_NAME-full" \ |
|
521 |
SYMBOL_ARCHIVE_BASENAME="$SYMBOLS_NAME" |
|
522 |
if [ -e dist/*symbols.zip ]; then |
|
523 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/mozilla/ |
|
524 |
cp dist/*symbols.zip $RPM_BUILD_ROOT%{_datadir}/mozilla/ |
|
525 |
fi |
|
526 |
%endif |
|
527 |
||
528 |
%clean |
|
529 |
rm -rf $RPM_BUILD_ROOT |
|
530 |
%if %localize |
|
531 |
rm -rf %{_tmppath}/translations.* |
|
532 |
%endif |
|
533 |
||
534 |
%post |
|
535 |
# update mime and desktop database |
|
536 |
%if %suse_version > 1130 |
|
537 |
%mime_database_post |
|
538 |
%desktop_database_post |
|
539 |
%icon_theme_cache_post |
|
540 |
%else |
|
541 |
if [ -f usr/bin/update-mime-database ] ; then |
|
542 |
usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : |
|
543 |
fi |
|
544 |
if [ -f usr/bin/update-desktop-database ] ; then |
|
545 |
usr/bin/update-desktop-database > /dev/null || : |
|
546 |
fi |
|
547 |
%endif |
|
548 |
%{progdir}/add-plugins.sh > /dev/null 2>&1 |
|
549 |
exit 0 |
|
550 |
||
551 |
%postun |
|
552 |
%if %suse_version > 1130 |
|
553 |
%icon_theme_cache_postun |
|
554 |
%desktop_database_postun |
|
555 |
%mime_database_postun |
|
556 |
%else |
|
557 |
if [ -f usr/bin/update-mime-database ] ; then |
|
558 |
usr/bin/update-mime-database %{_datadir}/mime > /dev/null || : |
|
559 |
fi |
|
560 |
if [ -f usr/bin/update-desktop-database ] ; then |
|
561 |
usr/bin/update-desktop-database > /dev/null || : |
|
562 |
fi |
|
563 |
%endif |
|
564 |
exit 0 |
|
565 |
||
566 |
%posttrans |
|
567 |
[ -e %{progdir}/add-plugins.sh ] && \ |
|
568 |
%{progdir}/add-plugins.sh > /dev/null 2>&1 |
|
569 |
exit 0 |
|
570 |
||
571 |
%preun |
|
572 |
rm -f %{progdir}/dictionaries/* |
|
573 |
exit 0 |
|
574 |
||
575 |
%files |
|
576 |
%defattr(-,root,root) |
|
577 |
%dir %{progdir} |
|
578 |
%dir %{progdir}/browser/ |
|
579 |
%dir %{progdir}/browser/chrome/ |
|
580 |
%dir %{progdir}/browser/extensions/ |
|
581 |
%{progdir}/browser/components/ |
|
582 |
%{progdir}/browser/defaults |
|
583 |
%{progdir}/browser/icons/ |
|
584 |
%{progdir}/browser/chrome/icons |
|
585 |
%{progdir}/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd} |
|
586 |
%{progdir}/browser/searchplugins/ |
|
587 |
%{progdir}/browser/blocklist.xml |
|
588 |
%{progdir}/browser/chrome.manifest |
|
589 |
%{progdir}/browser/omni.ja |
|
590 |
%dir %{progdir}/distribution/ |
|
591 |
%{progdir}/distribution/extensions/ |
|
592 |
%{progdir}/components/ |
|
593 |
%{progdir}/defaults/ |
|
594 |
%{progdir}/dictionaries/ |
|
595 |
%{progdir}/webapprt/ |
|
596 |
%attr(755,root,root) %{progdir}/%{progname}.sh |
|
597 |
%{progdir}/firefox |
|
598 |
%{progdir}/firefox-bin |
|
599 |
%{progdir}/add-plugins.sh |
|
600 |
%{progdir}/application.ini |
|
601 |
%{progdir}/dependentlibs.list |
|
602 |
%{progdir}/*.so |
|
603 |
%{progdir}/mozilla-xremote-client |
|
604 |
%{progdir}/omni.ja |
|
605 |
%{progdir}/platform.ini |
|
606 |
%{progdir}/plugin-container |
|
607 |
%{progdir}/webapprt-stub |
|
608 |
%{progdir}/chrome.manifest |
|
609 |
%if %crashreporter |
|
610 |
%{progdir}/crashreporter |
|
611 |
%{progdir}/crashreporter.ini |
|
612 |
%{progdir}/Throbber-small.gif |
|
613 |
%{progdir}/browser/crashreporter-override.ini |
|
614 |
%endif |
|
615 |
%{_datadir}/applications/%{desktop_file_name}.desktop |
|
616 |
%{_datadir}/mime/packages/%{progname}.xml |
|
617 |
%{_datadir}/pixmaps/firefox* |
|
618 |
%dir %{_datadir}/mozilla |
|
619 |
%dir %{_datadir}/mozilla/extensions |
|
620 |
%dir %{_datadir}/mozilla/extensions/%{firefox_appid} |
|
621 |
%dir %{_libdir}/mozilla |
|
622 |
%dir %{_libdir}/mozilla/extensions |
|
623 |
%dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
|
624 |
%{gnome_dir}/share/icons/hicolor/ |
|
625 |
%{_bindir}/%{progname} |
|
626 |
%doc %{_mandir}/man1/%{progname}.1.gz |
|
627 |
||
628 |
%files devel |
|
629 |
%defattr(-,root,root) |
|
630 |
%{_bindir}/mozilla-get-app-id |
|
631 |
%config /etc/rpm/macros.%{progname} |
|
632 |
||
633 |
%if %localize |
|
634 |
||
635 |
%files translations-common -f %{_tmppath}/translations.common |
|
636 |
%defattr(-,root,root) |
|
637 |
%dir %{progdir} |
|
638 |
%dir %{progdir}/browser/extensions/ |
|
639 |
||
640 |
%files translations-other -f %{_tmppath}/translations.other |
|
641 |
%defattr(-,root,root) |
|
642 |
%dir %{progdir} |
|
643 |
%dir %{progdir}/browser/extensions/ |
|
644 |
%endif |
|
645 |
||
646 |
# this package does not need to provide files but is needed to fulfill |
|
647 |
# requirements if no other branding package is to be installed |
|
648 |
||
649 |
%files branding-upstream |
|
650 |
%defattr(-,root,root) |
|
651 |
%dir %{progdir} |
|
652 |
||
653 |
%if %crashreporter |
|
654 |
||
655 |
%files buildsymbols |
|
656 |
%defattr(-,root,root) |
|
657 |
%{_datadir}/mozilla/*.zip |
|
658 |
%endif |
|
659 |
||
660 |
%changelog |