|
1 # |
|
2 # spec file for package firefox-esr |
|
3 # |
|
4 # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. |
|
5 # 2006-2014 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 %define major 31 |
|
21 %define mainver %major.1.0 |
|
22 %define update_channel esr31 |
|
23 |
|
24 %if %suse_version > 1210 |
|
25 %if %suse_version > 1310 |
|
26 %define gstreamer_ver 1.0 |
|
27 %define gstreamer 1 |
|
28 %else |
|
29 %define gstreamer_ver 0.10 |
|
30 %endif |
|
31 %endif |
|
32 |
|
33 Name: firefox-esr |
|
34 BuildRequires: Mesa-devel |
|
35 BuildRequires: autoconf213 |
|
36 BuildRequires: dbus-1-glib-devel |
|
37 BuildRequires: fdupes |
|
38 BuildRequires: gcc-c++ |
|
39 BuildRequires: libcurl-devel |
|
40 BuildRequires: libgnomeui-devel |
|
41 BuildRequires: libidl-devel |
|
42 BuildRequires: libnotify-devel |
|
43 %if %suse_version > 1140 |
|
44 BuildRequires: makeinfo |
|
45 %endif |
|
46 BuildRequires: python-devel |
|
47 BuildRequires: startup-notification-devel |
|
48 BuildRequires: unzip |
|
49 BuildRequires: update-desktop-files |
|
50 BuildRequires: xorg-x11-libXt-devel |
|
51 BuildRequires: xz |
|
52 BuildRequires: yasm |
|
53 BuildRequires: zip |
|
54 %if %suse_version > 1110 |
|
55 BuildRequires: libiw-devel |
|
56 BuildRequires: libproxy-devel |
|
57 %else |
|
58 BuildRequires: wireless-tools |
|
59 %endif |
|
60 BuildRequires: mozilla-nspr-devel >= 4.10.6 |
|
61 BuildRequires: mozilla-nss-devel >= 3.16.2 |
|
62 BuildRequires: nss-shared-helper-devel |
|
63 BuildRequires: pkgconfig(libpulse) |
|
64 %if %suse_version > 1210 |
|
65 BuildRequires: pkgconfig(gstreamer-%gstreamer_ver) |
|
66 BuildRequires: pkgconfig(gstreamer-app-%gstreamer_ver) |
|
67 BuildRequires: pkgconfig(gstreamer-plugins-base-%gstreamer_ver) |
|
68 %if 0%{?gstreamer} == 1 |
|
69 Requires: libgstreamer-1_0-0 |
|
70 Recommends: gstreamer-fluendo-mp3 |
|
71 Recommends: gstreamer-plugin-libav |
|
72 %else |
|
73 Requires: libgstreamer-0_10-0 |
|
74 Recommends: gstreamer-0_10-fluendo-mp3 |
|
75 Recommends: gstreamer-0_10-plugins-ffmpeg |
|
76 %endif |
|
77 %endif |
|
78 Version: %{mainver} |
|
79 Release: 0 |
|
80 %define releasedate 2014082900 |
|
81 Provides: firefox-esr = %{mainver} |
|
82 Provides: firefox-esr = %{version}-%{release} |
|
83 Provides: web_browser |
|
84 Provides: browser(npapi) |
|
85 # this is needed to match this package with the kde4 helper package without the main package |
|
86 # having a hard requirement on the kde4 package |
|
87 %define kde_helper_version 6 |
|
88 Provides: mozilla-kde4-version = %{kde_helper_version} |
|
89 Conflicts: firefox |
|
90 Summary: Mozilla Firefox Web Browser |
|
91 License: MPL-2.0 |
|
92 Group: Productivity/Networking/Web/Browsers |
|
93 Url: http://www.mozilla.org/ |
|
94 Source: firefox-%{version}-source.tar.xz |
|
95 Source1: MozillaFirefox.desktop |
|
96 Source2: MozillaFirefox-rpmlintrc |
|
97 Source3: mozilla.sh.in |
|
98 Source4: find-external-requires.sh |
|
99 Source5: source-stamp.txt |
|
100 Source6: kde.js |
|
101 Source7: l10n-%{version}.tar.xz |
|
102 Source8: firefox-mimeinfo.xml |
|
103 Source9: firefox.js |
|
104 Source10: compare-locales.tar.xz |
|
105 Source11: firefox.1 |
|
106 Source12: mozilla-get-app-id |
|
107 Source13: add-plugins.sh.in |
|
108 Source14: create-tar.sh |
|
109 # Gecko/Toolkit |
|
110 Patch1: toolkit-download-folder.patch |
|
111 Patch2: mozilla-nongnome-proxies.patch |
|
112 Patch3: mozilla-prefer_plugin_pref.patch |
|
113 Patch4: mozilla-shared-nss-db.patch |
|
114 Patch5: mozilla-kde.patch |
|
115 Patch6: mozilla-preferences.patch |
|
116 Patch7: mozilla-language.patch |
|
117 Patch8: mozilla-ntlm-full-path.patch |
|
118 Patch9: mozilla-repo.patch |
|
119 Patch10: mozilla-sle11.patch |
|
120 Patch11: mozilla-icu-strncat.patch |
|
121 Patch12: mozilla-arm-disable-edsp.patch |
|
122 Patch13: mozilla-ppc.patch |
|
123 Patch14: mozilla-libproxy-compat.patch |
|
124 Patch15: mozilla-nullptr-gcc45.patch |
|
125 # Gecko/Toolkit AArch64 Porting |
|
126 Patch30: mozilla-aarch64-bmo-810631.patch |
|
127 |
|
128 # Firefox/browser |
|
129 Patch101: firefox-kde.patch |
|
130 Patch102: firefox-kde-114.patch |
|
131 Patch103: firefox-no-default-ualocale.patch |
|
132 Patch104: firefox-multilocale-chrome.patch |
|
133 Patch105: firefox-branded-icons.patch |
|
134 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
|
135 Requires(post): coreutils shared-mime-info desktop-file-utils |
|
136 Requires(postun): shared-mime-info desktop-file-utils |
|
137 Requires: %{name}-branding > 20.0 |
|
138 Requires: mozilla-nspr >= %(rpm -q --queryformat '%{VERSION}' mozilla-nspr) |
|
139 Requires: mozilla-nss >= %(rpm -q --queryformat '%{VERSION}' mozilla-nss) |
|
140 Recommends: libcanberra0 |
|
141 Recommends: libpulse0 |
|
142 # libproxy's mozjs pacrunner crashes FF (bnc#759123) |
|
143 %if %suse_version < 1220 |
|
144 Obsoletes: libproxy1-pacrunner-mozjs <= 0.4.7 |
|
145 %endif |
|
146 %define firefox_appid \{ec8030f7-c20a-464f-9b0e-13a3a9e97384\} |
|
147 %define _use_internal_dependency_generator 0 |
|
148 %define __find_requires sh %{SOURCE4} |
|
149 %global provfind sh -c "grep -v '.so' | %__find_provides" |
|
150 %global __find_provides %provfind |
|
151 %define progname firefox |
|
152 %define progdir %{_prefix}/%_lib/%{progname} |
|
153 %define gnome_dir %{_prefix} |
|
154 %if %suse_version > 1130 |
|
155 %define desktop_file_name firefox |
|
156 %else |
|
157 %define desktop_file_name %{name} |
|
158 %endif |
|
159 ### build options |
|
160 # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys |
|
161 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
|
162 # please get your own set of keys. |
|
163 %define _google_api_key AIzaSyD1hTe85_a14kr1Ks8T3Ce75rvbR1_Dx7Q |
|
164 %define branding 1 |
|
165 %define localize 1 |
|
166 %ifarch aarch64 ppc ppc64 ppc64le s390 s390x ia64 %arm |
|
167 %define crashreporter 0 |
|
168 %else |
|
169 %define crashreporter 1 |
|
170 %endif |
|
171 ### build options end |
|
172 |
|
173 %description |
|
174 Mozilla Firefox is a standalone web browser, designed for standards |
|
175 compliance and performance. Its functionality can be enhanced via a |
|
176 plethora of extensions. |
|
177 |
|
178 %package devel |
|
179 Summary: Devel package for Firefox |
|
180 Group: Development/Tools/Other |
|
181 Provides: firefox-devel = %{version}-%{release} |
|
182 Requires: %{name} = %{version} |
|
183 Requires: perl(Archive::Zip) |
|
184 Requires: perl(XML::Simple) |
|
185 |
|
186 %description devel |
|
187 Development files for Firefox to make packaging of addons easier. |
|
188 |
|
189 %if %localize |
|
190 %package translations-common |
|
191 Summary: Common translations for Firefox |
|
192 Group: System/Localization |
|
193 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) |
|
194 Requires: %{name} = %{version} |
|
195 Obsoletes: %{name}-translations < %{version}-%{release} |
|
196 |
|
197 %description translations-common |
|
198 This package contains several common languages for the user interface |
|
199 of Firefox. |
|
200 |
|
201 %package translations-other |
|
202 Summary: Extra translations for Firefox |
|
203 Group: System/Localization |
|
204 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) |
|
205 Requires: %{name} = %{version} |
|
206 Obsoletes: %{name}-translations < %{version}-%{release} |
|
207 |
|
208 %description translations-other |
|
209 This package contains rarely used languages for the user interface |
|
210 of Firefox. |
|
211 %endif |
|
212 |
|
213 %package branding-upstream |
|
214 Summary: Upstream branding for Firefox |
|
215 Group: Productivity/Networking/Web/Browsers |
|
216 Provides: %{name}-branding = %{version} |
|
217 Conflicts: otherproviders(MozillaFirefox-branding) |
|
218 Supplements: packageand(%{name}:branding-upstream) |
|
219 #BRAND: Provide three files - |
|
220 #BRAND: /usr/lib/firefox/browserconfig.properties that contains the |
|
221 #BRAND: default homepage and some other default configuration options |
|
222 #BRAND: /usr/lib/firefox/defaults/profile/bookmarks.html that contains |
|
223 #BRAND: the list of default bookmarks |
|
224 #BRAND: It's also possible to create a file |
|
225 #BRAND: /usr/lib/firefox/defaults/preferences/firefox-$vendor.js to set |
|
226 #BRAND: custom preference overrides. |
|
227 #BRAND: It's also possible to drop files in /usr/lib/firefox/searchplugins |
|
228 |
|
229 %description branding-upstream |
|
230 This package provides upstream look and feel for Firefox. |
|
231 |
|
232 |
|
233 %if %crashreporter |
|
234 |
|
235 %package buildsymbols |
|
236 Summary: Breakpad buildsymbols for %{name} |
|
237 Group: Development/Debug |
|
238 |
|
239 %description buildsymbols |
|
240 This subpackage contains the Breakpad created and compatible debugging |
|
241 symbols meant for upload to Mozilla's crash collector database. |
|
242 %endif |
|
243 |
|
244 %prep |
|
245 %if %localize |
|
246 %setup -q -n mozilla -b 7 -b 10 |
|
247 %else |
|
248 %setup -q -n mozilla |
|
249 %endif |
|
250 cd $RPM_BUILD_DIR/mozilla |
|
251 %patch1 -p1 |
|
252 %patch2 -p1 |
|
253 %patch3 -p1 |
|
254 %patch4 -p1 |
|
255 %patch5 -p1 |
|
256 %patch6 -p1 |
|
257 %patch7 -p1 |
|
258 %patch8 -p1 |
|
259 %patch9 -p1 |
|
260 %if %suse_version < 1120 |
|
261 %patch10 -p1 |
|
262 %endif |
|
263 %patch11 -p1 |
|
264 %patch12 -p1 |
|
265 %patch13 -p1 |
|
266 %patch14 -p1 |
|
267 %patch15 -p1 |
|
268 %patch30 -p1 |
|
269 |
|
270 # Firefox |
|
271 %patch101 -p1 |
|
272 %if %suse_version >= 1140 |
|
273 %patch102 -p1 |
|
274 %endif |
|
275 %patch103 -p1 |
|
276 %patch104 -p1 |
|
277 %patch105 -p1 |
|
278 |
|
279 %build |
|
280 # no need to add build time to binaries |
|
281 modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" |
|
282 DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" |
|
283 TIME="\"$(date -d "${modified}" "+%%R")\"" |
|
284 find . -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + |
|
285 # |
|
286 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
|
287 if test "$kdehelperversion" != %{kde_helper_version}; then |
|
288 echo fix kde helper version in the .spec file |
|
289 exit 1 |
|
290 fi |
|
291 source %{SOURCE5} |
|
292 export MOZ_SOURCE_STAMP=$REV |
|
293 export SOURCE_REPO=$REPO |
|
294 export source_repo=$REPO |
|
295 export MOZ_SOURCE_REPO=$REPO |
|
296 export MOZ_BUILD_DATE=%{releasedate} |
|
297 export MOZILLA_OFFICIAL=1 |
|
298 export BUILD_OFFICIAL=1 |
|
299 export MOZ_TELEMETRY_REPORTING=1 |
|
300 export MOZ_GOOGLE_API_KEY=%{_google_api_key} |
|
301 export CFLAGS="$RPM_OPT_FLAGS -Os -fno-strict-aliasing" |
|
302 %ifarch %arm |
|
303 export CFLAGS="${CFLAGS/-g / }" |
|
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 --with-system-nspr |
|
322 ac_add_options --with-system-nss |
|
323 %if %{localize} |
|
324 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
|
325 %endif |
|
326 #ac_add_options --with-system-jpeg # libjpeg-turbo is used internally |
|
327 #ac_add_options --with-system-png # doesn't work because of missing APNG support |
|
328 ac_add_options --with-system-zlib |
|
329 ac_add_options --disable-installer |
|
330 ac_add_options --disable-updater |
|
331 ac_add_options --disable-tests |
|
332 ac_add_options --disable-debug |
|
333 ac_add_options --enable-startup-notification |
|
334 #ac_add_options --enable-chrome-format=jar |
|
335 ac_add_options --enable-update-channel=%{update_channel} |
|
336 %if 0%{?gstreamer} == 1 |
|
337 ac_add_options --enable-gstreamer=1.0 |
|
338 %endif |
|
339 %if %suse_version > 1130 |
|
340 ac_add_options --disable-gnomevfs |
|
341 ac_add_options --enable-gio |
|
342 %endif |
|
343 %if %suse_version < 1220 |
|
344 ac_add_options --disable-gstreamer |
|
345 %endif |
|
346 %if %branding |
|
347 ac_add_options --enable-official-branding |
|
348 %endif |
|
349 %if %suse_version > 1110 |
|
350 ac_add_options --enable-libproxy |
|
351 %endif |
|
352 %if ! %crashreporter |
|
353 ac_add_options --disable-crashreporter |
|
354 %endif |
|
355 # Disable neon for arm as it does not build correctly |
|
356 %ifarch %arm |
|
357 ac_add_options --disable-neon |
|
358 %endif |
|
359 %ifnarch %ix86 x86_64 |
|
360 ac_add_options --disable-webrtc |
|
361 %endif |
|
362 # try to use OpenGL-ES on ARM |
|
363 %ifarch %arm |
|
364 ac_add_options --with-gl-provider=EGL |
|
365 %endif |
|
366 EOF |
|
367 make -f client.mk build |
|
368 |
|
369 %install |
|
370 cd $RPM_BUILD_DIR/obj |
|
371 source %{SOURCE5} |
|
372 export MOZ_SOURCE_STAMP=$REV |
|
373 export MOZ_SOURCE_REPO=$REPO |
|
374 # need to remove default en-US firefox-l10n.js before it gets |
|
375 # populated into browser's omni.ja; it only contains general.useragent.locale |
|
376 # which should be loaded from each language pack (set in firefox.js) |
|
377 rm dist/bin/browser/defaults/preferences/firefox-l10n.js |
|
378 make -C browser/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0 |
|
379 #DEBUG (break the build if searchplugins are missing / temporary) |
|
380 grep amazondotcom dist/firefox/browser/omni.ja |
|
381 # copy tree into RPM_BUILD_ROOT |
|
382 mkdir -p $RPM_BUILD_ROOT%{progdir} |
|
383 cp -rf $RPM_BUILD_DIR/obj/dist/firefox/* $RPM_BUILD_ROOT%{progdir} |
|
384 mkdir -p $RPM_BUILD_ROOT%{progdir}/distribution/extensions |
|
385 mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/searchplugins |
|
386 mkdir -p $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/ |
|
387 # install kde.js |
|
388 install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/kde.js |
|
389 install -m 644 %{SOURCE9} $RPM_BUILD_ROOT%{progdir}/browser/defaults/preferences/firefox.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 |