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