15 |
15 |
16 # Please submit bugfixes or comments via https://bugs.opensuse.org/ |
16 # Please submit bugfixes or comments via https://bugs.opensuse.org/ |
17 # |
17 # |
18 |
18 |
19 |
19 |
|
20 %if 0%{?suse_version} < 1550 && 0%{?sle_version} <= 150100 |
|
21 #!BuildIgnore: post-build-checks |
|
22 %endif |
|
23 |
20 # changed with every update |
24 # changed with every update |
21 # orig_version vs. mainver: To have beta-builds |
25 # orig_version vs. mainver: To have beta-builds |
22 # FF70beta3 would be released as FF69.99 |
26 # FF70beta3 would be released as FF69.99 |
23 # orig_version would be the upstream tar ball |
27 # orig_version would be the upstream tar ball |
24 # orig_version 70.0 |
28 # orig_version 70.0 |
25 # orig_suffix b3 |
29 # orig_suffix b3 |
26 # major 69 |
30 # major 69 |
27 # mainver %major.99 |
31 # mainver %major.99 |
28 %define major 77 |
32 %define major 81 |
29 %define mainver %major.99 |
33 %define mainver %major.0 |
30 %define orig_version 78.0 |
34 %define orig_version 81.0 |
31 %define orig_suffix b8 |
35 %define orig_suffix %{nil} |
32 %define update_channel beta |
36 %define update_channel release |
33 %define branding 1 |
37 %define branding 1 |
34 %define devpkg 1 |
38 %define devpkg 1 |
35 |
39 |
36 %if 0%{?suse_version} > 1500 |
|
37 # PGO builds do not work in TW currently (bmo#1642410) |
40 # PGO builds do not work in TW currently (bmo#1642410) |
38 %define do_profiling 0 |
41 %define do_profiling 0 |
39 %endif |
|
40 |
42 |
41 # upstream default is clang (to use gcc for large parts set to 0) |
43 # upstream default is clang (to use gcc for large parts set to 0) |
42 %define clang_build 0 |
44 %define clang_build 0 |
43 |
45 |
44 # PIE, full relro |
46 # PIE, full relro |
88 %if 0%{?suse_version} <= 1320 |
90 %if 0%{?suse_version} <= 1320 |
89 BuildRequires: gcc9-c++ |
91 BuildRequires: gcc9-c++ |
90 %else |
92 %else |
91 BuildRequires: gcc-c++ |
93 BuildRequires: gcc-c++ |
92 %endif |
94 %endif |
93 BuildRequires: cargo >= 1.41 |
95 BuildRequires: cargo >= 1.43 |
|
96 BuildRequires: ccache |
94 BuildRequires: libXcomposite-devel |
97 BuildRequires: libXcomposite-devel |
95 BuildRequires: libcurl-devel |
98 BuildRequires: libcurl-devel |
96 BuildRequires: libidl-devel |
99 BuildRequires: libidl-devel |
97 BuildRequires: libiw-devel |
100 BuildRequires: libiw-devel |
98 BuildRequires: libproxy-devel |
101 BuildRequires: libproxy-devel |
99 BuildRequires: makeinfo |
102 BuildRequires: makeinfo |
100 BuildRequires: mozilla-nspr-devel >= 4.25 |
103 BuildRequires: mozilla-nspr-devel >= 4.28 |
101 BuildRequires: mozilla-nss-devel >= 3.53.1 |
104 BuildRequires: mozilla-nss-devel >= 3.56 |
102 BuildRequires: nasm >= 2.14 |
105 BuildRequires: nasm >= 2.14 |
103 BuildRequires: nodejs10 >= 10.21.0 |
106 BuildRequires: nodejs10 >= 10.21.0 |
104 BuildRequires: python-devel |
|
105 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
107 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000 |
106 BuildRequires: python-libxml2 |
108 BuildRequires: python-libxml2 |
107 BuildRequires: python36 |
109 BuildRequires: python36 |
108 %else |
110 %else |
109 BuildRequires: python2-xml |
111 BuildRequires: python3-devel |
110 BuildRequires: python3 >= 3.5 |
112 BuildRequires: python3 >= 3.5 |
111 %endif |
113 BuildRequires: python3-curses |
112 BuildRequires: rust >= 1.41 |
114 %endif |
113 BuildRequires: rust-cbindgen >= 0.14.1 |
115 BuildRequires: rust >= 1.43 |
|
116 BuildRequires: rust-cbindgen >= 0.14.3 |
114 BuildRequires: unzip |
117 BuildRequires: unzip |
115 BuildRequires: update-desktop-files |
118 BuildRequires: update-desktop-files |
116 BuildRequires: xorg-x11-libXt-devel |
119 BuildRequires: xorg-x11-libXt-devel |
117 %if 0%{?do_profiling} |
120 %if 0%{?do_profiling} |
118 BuildRequires: xvfb-run |
121 BuildRequires: xvfb-run |
186 # Gecko/Toolkit |
189 # Gecko/Toolkit |
187 Patch1: mozilla-nongnome-proxies.patch |
190 Patch1: mozilla-nongnome-proxies.patch |
188 Patch2: mozilla-kde.patch |
191 Patch2: mozilla-kde.patch |
189 Patch3: mozilla-ntlm-full-path.patch |
192 Patch3: mozilla-ntlm-full-path.patch |
190 Patch4: mozilla-aarch64-startup-crash.patch |
193 Patch4: mozilla-aarch64-startup-crash.patch |
191 Patch5: mozilla-bmo1463035.patch |
|
192 Patch6: mozilla-sandbox-fips.patch |
194 Patch6: mozilla-sandbox-fips.patch |
193 Patch7: mozilla-fix-aarch64-libopus.patch |
195 Patch7: mozilla-fix-aarch64-libopus.patch |
194 Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
196 Patch8: mozilla-disable-wasm-emulate-arm-unaligned-fp-access.patch |
195 Patch9: mozilla-s390-context.patch |
197 Patch9: mozilla-s390-context.patch |
196 Patch11: mozilla-reduce-rust-debuginfo.patch |
198 Patch11: mozilla-reduce-rust-debuginfo.patch |
208 Patch23: mozilla-pipewire-0-3.patch |
210 Patch23: mozilla-pipewire-0-3.patch |
209 Patch24: mozilla-bmo1602730.patch |
211 Patch24: mozilla-bmo1602730.patch |
210 Patch25: mozilla-bmo998749.patch |
212 Patch25: mozilla-bmo998749.patch |
211 Patch26: mozilla-bmo1626236.patch |
213 Patch26: mozilla-bmo1626236.patch |
212 Patch27: mozilla-s390x-skia-gradient.patch |
214 Patch27: mozilla-s390x-skia-gradient.patch |
|
215 Patch28: mozilla-libavcodec58_91.patch |
|
216 Patch29: revert-795c8762b16b.patch |
213 # Firefox/browser |
217 # Firefox/browser |
214 Patch101: firefox-kde.patch |
218 Patch101: firefox-kde.patch |
215 Patch102: firefox-branded-icons.patch |
219 Patch102: firefox-branded-icons.patch |
216 %endif # only_print_mozconfig |
220 %endif |
217 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
221 BuildRoot: %{_tmppath}/%{name}-%{version}-build |
218 Requires(post): coreutils shared-mime-info desktop-file-utils |
222 Requires(post): coreutils shared-mime-info desktop-file-utils |
219 Requires(postun): shared-mime-info desktop-file-utils |
223 Requires(postun): shared-mime-info desktop-file-utils |
220 Requires: %{name}-branding >= 68 |
224 Requires: %{name}-branding >= 68 |
221 Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr) |
225 %requires_ge mozilla-nspr |
222 Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss) |
226 %requires_ge mozilla-nss |
|
227 %requires_ge libfreetype6 |
223 Recommends: libcanberra0 |
228 Recommends: libcanberra0 |
224 Recommends: libpulse0 |
229 Recommends: libpulse0 |
225 # addon leads to startup crash (bnc#908892) |
230 # addon leads to startup crash (bnc#908892) |
226 Obsoletes: tracker-miner-firefox < 0.15 |
231 Obsoletes: tracker-miner-firefox < 0.15 |
227 %if 0%{?devpkg} == 0 |
232 %if 0%{?devpkg} == 0 |
375 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
381 kdehelperversion=$(cat toolkit/xre/nsKDEUtils.cpp | grep '#define KMOZILLAHELPER_VERSION' | cut -d ' ' -f 3) |
376 if test "$kdehelperversion" != %{kde_helper_version}; then |
382 if test "$kdehelperversion" != %{kde_helper_version}; then |
377 echo fix kde helper version in the .spec file |
383 echo fix kde helper version in the .spec file |
378 exit 1 |
384 exit 1 |
379 fi |
385 fi |
380 %endif # only_print_mozconfig |
|
381 |
386 |
382 source %{SOURCE4} |
387 source %{SOURCE4} |
|
388 %endif |
383 |
389 |
384 export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo |
390 export CARGO_HOME=${RPM_BUILD_DIR}/%{srcname}-%{orig_version}/.cargo |
385 export MOZ_SOURCE_CHANGESET=$RELEASE_TAG |
391 export MOZ_SOURCE_CHANGESET=$RELEASE_TAG |
386 export SOURCE_REPO=$RELEASE_REPO |
392 export SOURCE_REPO=$RELEASE_REPO |
387 export source_repo=$RELEASE_REPO |
393 export source_repo=$RELEASE_REPO |
388 export MOZ_SOURCE_REPO=$RELEASE_REPO |
394 export MOZ_SOURCE_REPO=$RELEASE_REPO |
389 export MOZ_BUILD_DATE=$RELEASE_TIMESTAMP |
395 export MOZ_BUILD_DATE=$RELEASE_TIMESTAMP |
390 export MOZILLA_OFFICIAL=1 |
396 export MOZILLA_OFFICIAL=1 |
391 export BUILD_OFFICIAL=1 |
397 export BUILD_OFFICIAL=1 |
392 export MOZ_TELEMETRY_REPORTING=1 |
398 export MOZ_TELEMETRY_REPORTING=1 |
|
399 export MACH_USE_SYSTEM_PYTHON=1 |
393 %if 0%{?suse_version} <= 1320 |
400 %if 0%{?suse_version} <= 1320 |
394 export CC=gcc-9 |
401 export CC=gcc-9 |
395 %else |
402 %else |
396 %if 0%{?clang_build} == 0 |
403 %if 0%{?clang_build} == 0 |
397 export CC=gcc |
404 export CC=gcc |
476 ac_add_options --enable-alsa |
482 ac_add_options --enable-alsa |
477 ac_add_options --disable-debug |
483 ac_add_options --disable-debug |
478 #ac_add_options --enable-chrome-format=jar |
484 #ac_add_options --enable-chrome-format=jar |
479 ac_add_options --enable-update-channel=%{update_channel} |
485 ac_add_options --enable-update-channel=%{update_channel} |
480 ac_add_options --with-mozilla-api-keyfile=%{SOURCE18} |
486 ac_add_options --with-mozilla-api-keyfile=%{SOURCE18} |
481 ac_add_options --with-google-location-service-api-keyfile=%{SOURCE19} |
487 # Google-service currently not available for free anymore |
|
488 #ac_add_options --with-google-location-service-api-keyfile=%{SOURCE19} |
482 ac_add_options --with-google-safebrowsing-api-keyfile=%{SOURCE19} |
489 ac_add_options --with-google-safebrowsing-api-keyfile=%{SOURCE19} |
483 ac_add_options --with-unsigned-addon-scopes=app |
490 ac_add_options --with-unsigned-addon-scopes=app |
|
491 ac_add_options --allow-addon-sideload |
484 %if %branding |
492 %if %branding |
485 ac_add_options --enable-official-branding |
493 ac_add_options --enable-official-branding |
486 %endif |
494 %endif |
487 ac_add_options --enable-libproxy |
495 ac_add_options --enable-libproxy |
488 %if ! %crashreporter |
496 %if ! %crashreporter |
520 echo "Generate big endian version of config/external/icu/data/icud58l.dat" |
528 echo "Generate big endian version of config/external/icu/data/icud58l.dat" |
521 ./mach python intl/icu_sources_data.py . |
529 ./mach python intl/icu_sources_data.py . |
522 ls -l config/external/icu/data |
530 ls -l config/external/icu/data |
523 rm -f config/external/icu/data/icudt*l.dat |
531 rm -f config/external/icu/data/icudt*l.dat |
524 %endif |
532 %endif |
|
533 ccache -s |
525 %if 0%{?do_profiling} |
534 %if 0%{?do_profiling} |
526 xvfb-run --server-args="-screen 0 1920x1080x24" \ |
535 xvfb-run --server-args="-screen 0 1920x1080x24" \ |
527 %endif |
536 %endif |
528 ./mach build -v |
537 ./mach build -v |
529 |
538 |
530 # build additional locales |
539 # build additional locales |
531 %if %localize |
540 %if %localize |
532 mkdir -p %{buildroot}%{progdir}/browser/extensions |
541 mkdir -p %{buildroot}%{progdir}/browser/extensions |
533 truncate -s 0 %{_tmppath}/translations.{common,other} |
542 truncate -s 0 %{_tmppath}/translations.{common,other} |
534 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ |
543 # langpack-build can not be done in parallel easily (see https://bugzilla.mozilla.org/show_bug.cgi?id=1660943) |
535 | xargs -n 1 -I {} /bin/sh -c ' |
544 # Therefore, we have to have a separate obj-dir for each language |
|
545 # We do this, by creating a mozconfig-template with the necessary switches |
|
546 # and a placeholder obj-dir, which gets copied and modified for each language |
|
547 |
|
548 # Create mozconfig-template for langbuild |
|
549 cat << EOF > ${MOZCONFIG}_LANG |
|
550 mk_add_options MOZILLA_OFFICIAL=1 |
|
551 mk_add_options BUILD_OFFICIAL=1 |
|
552 mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj_LANG |
|
553 . \$topsrcdir/browser/config/mozconfig |
|
554 ac_add_options --prefix=%{_prefix} |
|
555 ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n |
|
556 ac_add_options --disable-updater |
|
557 %if %branding |
|
558 ac_add_options --enable-official-branding |
|
559 %endif |
|
560 EOF |
|
561 |
|
562 sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \ |
|
563 | xargs -n 1 %{?jobs:-P %jobs} -I {} /bin/sh -c ' |
536 locale=$1 |
564 locale=$1 |
537 ./mach build langpack-$locale |
565 cp ${MOZCONFIG}_LANG ${MOZCONFIG}_$locale |
538 cp -rL ../obj/dist/xpi-stage/locale-$locale \ |
566 sed -i "s|obj_LANG|obj_$locale|" ${MOZCONFIG}_$locale |
539 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org |
567 export MOZCONFIG=${MOZCONFIG}_$locale |
|
568 # nsinstall is needed for langpack-build. It is already built by `./mach build`, but building it again is very fast |
|
569 ./mach build config/nsinstall langpack-$locale |
|
570 cp -L ../obj_$locale/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \ |
|
571 %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi |
540 # remove prefs, profile defaults, and hyphenation from langpack |
572 # remove prefs, profile defaults, and hyphenation from langpack |
541 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
573 #rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults |
542 rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
574 #rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation |
543 # check against the fixed common list and sort into the right filelist |
575 # check against the fixed common list and sort into the right filelist |
544 _matched=0 |
576 _matched=0 |
545 for _match in ar ca cs da de el 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 |
577 for _match in ar ca cs da de el 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 |
546 [ "$_match" = "$locale" ] && _matched=1 |
578 [ "$_match" = "$locale" ] && _matched=1 |
547 done |
579 done |
548 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
580 [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other |
549 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \ |
581 echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi \ |
550 >> %{_tmppath}/translations.$_l10ntarget |
582 >> %{_tmppath}/translations.$_l10ntarget |
551 ' -- {} |
583 ' -- {} |
552 %endif |
584 %endif |
553 |
585 |
554 %endif # only_print_mozconfig |
586 ccache -s |
|
587 %endif |
555 |
588 |
556 %install |
589 %install |
557 cd $RPM_BUILD_DIR/obj |
590 cd $RPM_BUILD_DIR/obj |
558 source %{SOURCE4} |
591 source %{SOURCE4} |
559 export MOZ_SOURCE_STAMP=$RELEASE_TAG |
592 export MOZ_SOURCE_STAMP=$RELEASE_TAG |
611 %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK |
644 %suse_update_desktop_file %{desktop_file_name} Network WebBrowser GTK |
612 # additional mime-types |
645 # additional mime-types |
613 mkdir -p %{buildroot}%{_datadir}/mime/packages |
646 mkdir -p %{buildroot}%{_datadir}/mime/packages |
614 cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml |
647 cp %{SOURCE8} %{buildroot}%{_datadir}/mime/packages/%{progname}.xml |
615 # appdata |
648 # appdata |
616 mkdir -p %{buildroot}%{_datadir}/appdata |
649 mkdir -p %{buildroot}%{_datadir}/metainfo |
617 sed "s:firefox.desktop:%{desktop_file_name}:g" \ |
650 sed "s:firefox.desktop:%{desktop_file_name}:g" \ |
618 %{SOURCE15} > %{buildroot}%{_datadir}/appdata/%{desktop_file_name}.appdata.xml |
651 %{SOURCE15} > %{buildroot}%{_datadir}/metainfo/%{desktop_file_name}.appdata.xml |
619 # install man-page |
652 # install man-page |
620 mkdir -p %{buildroot}%{_mandir}/man1/ |
653 mkdir -p %{buildroot}%{_mandir}/man1/ |
621 cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1 |
654 cp %{SOURCE11} %{buildroot}%{_mandir}/man1/%{progname}.1 |
622 ########## |
655 ########## |
623 # ADDONS |
656 # ADDONS |
746 %dir %{_libdir}/mozilla/extensions |
779 %dir %{_libdir}/mozilla/extensions |
747 %dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
780 %dir %{_libdir}/mozilla/extensions/%{firefox_appid} |
748 %{gnome_dir}/share/icons/hicolor/ |
781 %{gnome_dir}/share/icons/hicolor/ |
749 %{_bindir}/%{progname} |
782 %{_bindir}/%{progname} |
750 %doc %{_mandir}/man1/%{progname}.1.gz |
783 %doc %{_mandir}/man1/%{progname}.1.gz |
751 %{_datadir}/appdata/ |
784 %{_datadir}/metainfo/ |
752 |
785 |
753 %if 0%{?devpkg} |
786 %if 0%{?devpkg} |
754 %files devel |
787 %files devel |
755 %defattr(-,root,root) |
788 %defattr(-,root,root) |
756 %{_bindir}/mozilla-get-app-id |
789 %{_bindir}/mozilla-get-app-id |