16 # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
16 # Please submit bugfixes or comments via http://bugs.opensuse.org/ |
17 # |
17 # |
18 |
18 |
19 |
19 |
20 # changed with every update |
20 # changed with every update |
21 %define major 59 |
21 %define major 60 |
22 %define mainver %major.99 |
22 %define mainver %major.99 |
23 %define update_channel beta |
23 %define update_channel beta |
24 %define branding 1 |
24 %define branding 1 |
25 %define releasedate 20180426170554 |
25 %define releasedate 20180607135512 |
|
26 %define source_prefix firefox-%{mainver} |
26 |
27 |
27 # PIE, full relro (x86_64 for now) |
28 # PIE, full relro (x86_64 for now) |
28 %define build_hardened 1 |
29 %define build_hardened 1 |
29 |
30 |
30 # Firefox only supports i686 |
31 # Firefox only supports i686 |
69 BuildRequires: libiw-devel |
71 BuildRequires: libiw-devel |
70 BuildRequires: libnotify-devel |
72 BuildRequires: libnotify-devel |
71 BuildRequires: libproxy-devel |
73 BuildRequires: libproxy-devel |
72 BuildRequires: makeinfo |
74 BuildRequires: makeinfo |
73 BuildRequires: mozilla-nspr-devel >= 4.19 |
75 BuildRequires: mozilla-nspr-devel >= 4.19 |
74 BuildRequires: mozilla-nss-devel >= 3.36.1 |
76 BuildRequires: mozilla-nss-devel >= 3.37.3 |
75 BuildRequires: python-devel |
77 BuildRequires: python-devel |
76 BuildRequires: python2-xml |
78 BuildRequires: python2-xml |
77 BuildRequires: rust >= 1.24 |
79 BuildRequires: rust >= 1.24 |
78 BuildRequires: rust-std |
80 BuildRequires: rust-std |
79 BuildRequires: startup-notification-devel |
81 BuildRequires: startup-notification-devel |
118 Provides: mozilla-kde4-version = %{kde_helper_version} |
120 Provides: mozilla-kde4-version = %{kde_helper_version} |
119 Summary: Mozilla %{appname} Web Browser |
121 Summary: Mozilla %{appname} Web Browser |
120 License: MPL-2.0 |
122 License: MPL-2.0 |
121 Group: Productivity/Networking/Web/Browsers |
123 Group: Productivity/Networking/Web/Browsers |
122 Url: http://www.mozilla.org/ |
124 Url: http://www.mozilla.org/ |
123 Source: firefox-%{version}-source.tar.xz |
125 Source: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz |
124 Source1: MozillaFirefox.desktop |
126 Source1: MozillaFirefox.desktop |
125 Source2: MozillaFirefox-rpmlintrc |
127 Source2: MozillaFirefox-rpmlintrc |
126 Source3: mozilla.sh.in |
128 Source3: mozilla.sh.in |
127 Source5: source-stamp.txt |
129 Source5: source-stamp.txt |
128 Source6: kde.js |
130 Source6: kde.js |
139 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
141 # Set up API keys, see http://www.chromium.org/developers/how-tos/api-keys |
140 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
142 # Note: these are for the openSUSE Firefox builds ONLY. For your own distribution, |
141 # please get your own set of keys. |
143 # please get your own set of keys. |
142 Source18: mozilla-api-key |
144 Source18: mozilla-api-key |
143 Source19: google-api-key |
145 Source19: google-api-key |
|
146 Source20: http://ftp.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz.asc |
|
147 Source21: mozilla.keyring |
144 # Gecko/Toolkit |
148 # Gecko/Toolkit |
145 Patch1: mozilla-nongnome-proxies.patch |
149 Patch1: mozilla-nongnome-proxies.patch |
146 Patch2: mozilla-kde.patch |
150 Patch2: mozilla-kde.patch |
147 Patch3: mozilla-ntlm-full-path.patch |
151 Patch3: mozilla-ntlm-full-path.patch |
148 Patch4: mozilla-openaes-decl.patch |
152 Patch4: mozilla-openaes-decl.patch |
151 Patch7: mozilla-aarch64-startup-crash.patch |
155 Patch7: mozilla-aarch64-startup-crash.patch |
152 Patch8: mozilla-bmo256180.patch |
156 Patch8: mozilla-bmo256180.patch |
153 Patch9: mozilla-i586-DecoderDoctorLogger.patch |
157 Patch9: mozilla-i586-DecoderDoctorLogger.patch |
154 Patch10: mozilla-i586-domPrefs.patch |
158 Patch10: mozilla-i586-domPrefs.patch |
155 Patch11: mozilla-enable-csd.patch |
159 Patch11: mozilla-enable-csd.patch |
|
160 Patch12: mozilla-fix-skia-aarch64.patch |
|
161 Patch13: mozilla-bmo1375074.patch |
156 # Firefox/browser |
162 # Firefox/browser |
157 Patch101: firefox-kde.patch |
163 Patch101: firefox-kde.patch |
158 Patch102: firefox-branded-icons.patch |
164 Patch102: firefox-branded-icons.patch |
159 |
|
160 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
165 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
161 Requires(post): coreutils shared-mime-info desktop-file-utils |
166 Requires(post): coreutils shared-mime-info desktop-file-utils |
162 Requires(postun): shared-mime-info desktop-file-utils |
167 Requires(postun): shared-mime-info desktop-file-utils |
163 %if %branding |
168 %if %branding |
164 Requires: %{name}-branding > 44.0 |
169 Requires: %{name}-branding > 44.0 |
204 of %{appname}. |
209 of %{appname}. |
205 |
210 |
206 %package translations-other |
211 %package translations-other |
207 Summary: Extra translations for %{appname} |
212 Summary: Extra translations for %{appname} |
208 Group: System/Localization |
213 Group: System/Localization |
209 Provides: locale(%{name}:ach;af;an;as;ast;az;bg;bn_BD;bn_IN;br;bs;cak;cy;dsb;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;id;is;ka;kab;kk;km;kn;lij;lt;lv;mai;mk;ml;mr;ms;ne-NP;nn_NO;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;uz;vi;xh) |
214 Provides: locale(%{name}:ach;af;an;as;ast;az;bg;bn_BD;bn_IN;br;bs;cak;cy;dsb;en_ZA;eo;es_MX;et;eu;fa;ff;fy_NL;ga_IE;gd;gl;gn;gu_IN;he;hi_IN;hr;hsb;hy_AM;id;is;ka;kab;kk;km;kn;lij;lt;lv;mai;mk;ml;mr;ms;ne-NP;nn_NO;oc;or;pa_IN;rm;ro;si;sk;sl;son;sq;sr;ta;te;th;tr;uk;uz;vi;xh) |
210 Requires: %{name} = %{version} |
215 Requires: %{name} = %{version} |
211 Obsoletes: %{name}-translations < %{version}-%{release} |
216 Obsoletes: %{name}-translations < %{version}-%{release} |
212 |
217 |
213 %description translations-other |
218 %description translations-other |
214 This package contains rarely used languages for the user interface |
219 This package contains rarely used languages for the user interface |
315 %endif |
322 %endif |
316 %ifarch ppc64 ppc64le |
323 %ifarch ppc64 ppc64le |
317 export CFLAGS="$CFLAGS -mminimal-toc" |
324 export CFLAGS="$CFLAGS -mminimal-toc" |
318 %endif |
325 %endif |
319 export CXXFLAGS="$CFLAGS" |
326 export CXXFLAGS="$CFLAGS" |
|
327 %ifarch %{arm} |
|
328 export RUSTFLAGS="-Cdebuginfo=0" |
|
329 %endif |
320 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
330 export MOZCONFIG=$RPM_BUILD_DIR/mozconfig |
|
331 %limit_build -m 1500 |
321 cat << EOF > $MOZCONFIG |
332 cat << EOF > $MOZCONFIG |
322 mk_add_options MOZILLA_OFFICIAL=1 |
333 mk_add_options MOZILLA_OFFICIAL=1 |
323 mk_add_options BUILD_OFFICIAL=1 |
334 mk_add_options BUILD_OFFICIAL=1 |
324 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
335 mk_add_options MOZ_MAKE_FLAGS=%{?jobs:-j%jobs} |
325 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
336 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj |
401 # install browser prefs |
416 # install browser prefs |
402 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js |
417 install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kde.js |
403 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js |
418 install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js |
404 # install additional locales |
419 # install additional locales |
405 %if %localize |
420 %if %localize |
406 rm -f %{_tmppath}/translations.* |
421 truncate -s 0 %{_tmppath}/translations.{common,other} |
407 touch %{_tmppath}/translations.{common,other} |
422 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales \ |
408 for locale in $(cat $RPM_BUILD_DIR/mozilla/browser/locales/shipped-locales) ; do |
423 | xargs -P 8 -n 1 -I {} /bin/sh -c ' |
409 case $locale in |
424 locale=$1 |
410 ja-JP-mac|en-US|'') |
425 pushd $RPM_BUILD_DIR/compare-locales |
411 ;; |
426 PYTHONPATH=lib \ |
412 *) |
427 scripts/compare-locales -m ../l10n-merged/$locale \ |
413 pushd $RPM_BUILD_DIR/compare-locales |
428 ../%{source_prefix}/browser/locales/l10n.ini ../l10n $locale |
414 PYTHONPATH=lib \ |
429 popd |
415 scripts/compare-locales -m ../l10n-merged/$locale \ |
430 LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ |
416 ../mozilla/browser/locales/l10n.ini ../l10n $locale |
431 make -C browser/locales langpack-$locale |
417 popd |
432 cp -rL dist/xpi-stage/locale-$locale \ |
418 LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \ |
433 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org |
419 make -C browser/locales langpack-$locale |
434 # remove prefs, profile defaults, and hyphenation from langpack |
420 cp -rL dist/xpi-stage/locale-$locale \ |
435 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
421 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org |
436 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
422 # remove prefs, profile defaults, and hyphenation from langpack |
437 # check against the fixed common list and sort into the right filelist |
423 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
438 _matched=0 |
424 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
439 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 |
425 # check against the fixed common list and sort into the right filelist |
440 [ "$_match" = "$locale" ] && _matched=1 |
426 _matched=0 |
441 done |
427 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 |
442 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
428 [ "$_match" = "$locale" ] && _matched=1 |
443 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
429 done |
444 >> %{_tmppath}/translations.$_l10ntarget |
430 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
445 ' -- {} |
431 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
|
432 >> %{_tmppath}/translations.$_l10ntarget |
|
433 esac |
|
434 done |
|
435 %endif |
446 %endif |
436 # remove some executable permissions |
447 # remove some executable permissions |
437 find %{buildroot}%{progdir} \ |
448 find %{buildroot}%{progdir} \ |
438 -name "*.js" -o \ |
449 -name "*.js" -o \ |
439 -name "*.jsm" -o \ |
450 -name "*.jsm" -o \ |
440 -name "*.rdf" -o \ |
451 -name "*.rdf" -o \ |
441 -name "*.properties" -o \ |
452 -name "*.properties" -o \ |
442 -name "*.dtd" -o \ |
453 -name "*.dtd" -o \ |
443 -name "*.txt" -o \ |
454 -name "*.txt" -o \ |
444 -name "*.xml" -o \ |
455 -name "*.xml" -o \ |
445 -name "*.css" | xargs chmod a-x |
456 -name "*.css" \ |
|
457 -exec chmod a-x {} + |
446 # remove mkdir.done files from installed base |
458 # remove mkdir.done files from installed base |
447 find %{buildroot}%{progdir} -name ".mkdir.done" | xargs rm |
459 find %{buildroot}%{progdir} -type f -name ".mkdir.done" -delete |
448 # overwrite the mozilla start-script and link it to /usr/bin |
460 # overwrite the mozilla start-script and link it to /usr/bin |
449 mkdir --parents %{buildroot}/usr/bin |
461 mkdir --parents %{buildroot}/usr/bin |
450 sed "s:%%PREFIX:%{_prefix}:g |
462 sed "s:%%PREFIX:%{_prefix}:g |
451 s:%%PROGDIR:%{progdir}:g |
463 s:%%PROGDIR:%{progdir}:g |
452 s:%%APPNAME:firefox:g |
464 s:%%APPNAME:firefox:g |