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