- use ccache for build

- replace versioned RPM deps with requires_ge
- parallelize locale build

OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=851
This commit is contained in:
Wolfgang Rosenauer 2020-08-13 22:06:03 +00:00 committed by Git OBS Bridge
parent 50acacf655
commit 185b328f4f
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 10 09:19:38 UTC 2020 - Wolfgang Rosenauer <wr@rosenauer.org>
- use ccache for build
- replace versioned RPM deps with requires_ge
- parallelize locale build
-------------------------------------------------------------------
Thu Aug 6 14:37:16 UTC 2020 - Yunhe Guo <i@guoyunhe.me>

View File

@ -89,6 +89,7 @@ BuildRequires: gcc9-c++
BuildRequires: gcc-c++
%endif
BuildRequires: cargo >= 1.43
BuildRequires: ccache
BuildRequires: libXcomposite-devel
BuildRequires: libcurl-devel
BuildRequires: libidl-devel
@ -216,8 +217,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires(post): coreutils shared-mime-info desktop-file-utils
Requires(postun): shared-mime-info desktop-file-utils
Requires: %{name}-branding >= 68
Requires: mozilla-nspr >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nspr)
Requires: mozilla-nss >= %(rpm -q --queryformat '%%{VERSION}' mozilla-nss)
%requires_ge mozilla-nspr
%requires_ge mozilla-nss
%requires_ge libfreetype6
Recommends: libcanberra0
Recommends: libpulse0
# addon leads to startup crash (bnc#908892)
@ -463,6 +465,7 @@ ac_add_options --disable-elf-hack
#%endif
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --with-ccache
%if %{localize}
ac_add_options --with-l10n-base=$RPM_BUILD_DIR/l10n
%endif
@ -531,7 +534,7 @@ xvfb-run --server-args="-screen 0 1920x1080x24" \
mkdir -p %{buildroot}%{progdir}/browser/extensions
truncate -s 0 %{_tmppath}/translations.{common,other}
sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{srcname}-%{orig_version}/browser/locales/shipped-locales \
| xargs -n 1 -I {} /bin/sh -c '
| xargs -n 1 -P 0 -I {} /bin/sh -c '
locale=$1
./mach build langpack-$locale
cp -L ../obj/dist/linux-*/xpi/firefox-%{orig_version}.$locale.langpack.xpi \