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