MozillaFirefox/MozillaFirefox.spec
branchfirefox80
changeset 1141 edb0ebe8cccc
parent 1140 a9aa543a508a
child 1143 ff28137410eb
equal deleted inserted replaced
1140:a9aa543a508a 1141:edb0ebe8cccc
    23 # orig_version would be the upstream tar ball
    23 # orig_version would be the upstream tar ball
    24 # orig_version 70.0
    24 # orig_version 70.0
    25 # orig_suffix b3
    25 # orig_suffix b3
    26 # major 69
    26 # major 69
    27 # mainver %major.99
    27 # mainver %major.99
    28 %define major          79
    28 %define major          80
    29 %define mainver        %major.0
    29 %define mainver        %major.0
    30 %define orig_version   79.0
    30 %define orig_version   80.0
    31 %define orig_suffix    %{nil}
    31 %define orig_suffix    %{nil}
    32 %define update_channel release
    32 %define update_channel release
    33 %define branding       1
    33 %define branding       1
    34 %define devpkg         1
    34 %define devpkg         1
    35 
    35 
    93 BuildRequires:  libcurl-devel
    93 BuildRequires:  libcurl-devel
    94 BuildRequires:  libidl-devel
    94 BuildRequires:  libidl-devel
    95 BuildRequires:  libiw-devel
    95 BuildRequires:  libiw-devel
    96 BuildRequires:  libproxy-devel
    96 BuildRequires:  libproxy-devel
    97 BuildRequires:  makeinfo
    97 BuildRequires:  makeinfo
    98 BuildRequires:  mozilla-nspr-devel >= 4.26
    98 BuildRequires:  mozilla-nspr-devel >= 4.27
    99 BuildRequires:  mozilla-nss-devel >= 3.54
    99 BuildRequires:  mozilla-nss-devel >= 3.55
   100 BuildRequires:  nasm >= 2.14
   100 BuildRequires:  nasm >= 2.14
   101 BuildRequires:  nodejs10 >= 10.21.0
   101 BuildRequires:  nodejs10 >= 10.21.0
   102 BuildRequires:  python-devel
   102 BuildRequires:  python-devel
   103 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
   103 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} < 150000
   104 BuildRequires:  python-libxml2
   104 BuildRequires:  python-libxml2
   206 Patch24:        mozilla-bmo1602730.patch
   206 Patch24:        mozilla-bmo1602730.patch
   207 Patch25:        mozilla-bmo998749.patch
   207 Patch25:        mozilla-bmo998749.patch
   208 Patch26:        mozilla-bmo1626236.patch
   208 Patch26:        mozilla-bmo1626236.patch
   209 Patch27:        mozilla-s390x-skia-gradient.patch
   209 Patch27:        mozilla-s390x-skia-gradient.patch
   210 Patch28:        mozilla-libavcodec58_91.patch
   210 Patch28:        mozilla-libavcodec58_91.patch
       
   211 Patch29:        mozilla-system-nspr.patch
   211 # Firefox/browser
   212 # Firefox/browser
   212 Patch101:       firefox-kde.patch
   213 Patch101:       firefox-kde.patch
   213 Patch102:       firefox-branded-icons.patch
   214 Patch102:       firefox-branded-icons.patch
   214 %endif # only_print_mozconfig
   215 %endif # only_print_mozconfig
   215 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   216 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
   348 %patch24 -p1
   349 %patch24 -p1
   349 %patch25 -p1
   350 %patch25 -p1
   350 %patch26 -p1
   351 %patch26 -p1
   351 %patch27 -p1
   352 %patch27 -p1
   352 %patch28 -p1
   353 %patch28 -p1
       
   354 %patch29 -p1
   353 # Firefox
   355 # Firefox
   354 %patch101 -p1
   356 %patch101 -p1
   355 %patch102 -p1
   357 %patch102 -p1
   356 %endif # only_print_mozconfig
   358 %endif # only_print_mozconfig
   357 
   359 
   516 echo "Generate big endian version of config/external/icu/data/icud58l.dat"
   518 echo "Generate big endian version of config/external/icu/data/icud58l.dat"
   517 ./mach python intl/icu_sources_data.py .
   519 ./mach python intl/icu_sources_data.py .
   518 ls -l config/external/icu/data
   520 ls -l config/external/icu/data
   519 rm -f config/external/icu/data/icudt*l.dat
   521 rm -f config/external/icu/data/icudt*l.dat
   520 %endif
   522 %endif
       
   523 ccache -s
   521 %if 0%{?do_profiling}
   524 %if 0%{?do_profiling}
   522 xvfb-run --server-args="-screen 0 1920x1080x24" \
   525 xvfb-run --server-args="-screen 0 1920x1080x24" \
   523 %endif
   526 %endif
   524 ./mach build -v
   527 ./mach build -v
   525 
   528 
   526 # build additional locales
   529 # build additional locales
   527 %if %localize
   530 %if %localize
       
   531 # The file obj/browser/locales/bookmarks.html will be overwritten by each langpack-build with the current translation
       
   532 # Thus we save here the original, to restore it afterwards, so that the default installation will not have zh-TW
       
   533 # bookmarks
       
   534 # See also https://bugzilla.opensuse.org/show_bug.cgi?id=1167976
       
   535 cp ../obj/browser/locales/bookmarks.html ../obj/browser/locales/bookmarks.html_ORIG
       
   536 
   528 mkdir -p %{buildroot}%{progdir}/browser/extensions
   537 mkdir -p %{buildroot}%{progdir}/browser/extensions
   529 truncate -s 0 %{_tmppath}/translations.{common,other}
   538 truncate -s 0 %{_tmppath}/translations.{common,other}
   530 sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \
   539 # Adding "-P 0" would give us parallel builds of langpacks. Unfortunately, mach currently doesn't support
   531     | xargs -n 1 -P 0 -I {} /bin/sh -c '
   540 # building them in parallel. If we do, we get race-conditions and have mixed languages in the langpacks.
       
   541 # See https://bugzilla.suse.com/show_bug.cgi?id=1173986
       
   542 sed -r '/^(ja-JP-mac|ga-IE|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \
       
   543     | xargs -n 1 -I {} /bin/sh -c '
   532         locale=$1
   544         locale=$1
   533         ./mach build langpack-$locale
   545         ./mach build langpack-$locale
   534         cp -L ../obj/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \
   546         cp -L ../obj/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \
   535             %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi
   547             %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi
   536         # remove prefs, profile defaults, and hyphenation from langpack
   548         # remove prefs, profile defaults, and hyphenation from langpack
   543         done
   555         done
   544         [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
   556         [ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
   545         echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi \
   557         echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org.xpi \
   546             >> %{_tmppath}/translations.$_l10ntarget
   558             >> %{_tmppath}/translations.$_l10ntarget
   547 ' -- {}
   559 ' -- {}
   548 %endif
   560 
   549 
   561 # Restoring the original bookmarksfile
       
   562 cp ../obj/browser/locales/bookmarks.html_ORIG ../obj/browser/locales/bookmarks.html
       
   563 %endif
       
   564 
       
   565 ccache -s
   550 %endif # only_print_mozconfig
   566 %endif # only_print_mozconfig
   551 
   567 
   552 %install
   568 %install
   553 cd $RPM_BUILD_DIR/obj
   569 cd $RPM_BUILD_DIR/obj
   554 source %{SOURCE4}
   570 source %{SOURCE4}