Accepting request 607198 from home:pcerny:factory
parellelise locales building (package build speedup 10%+) OBS-URL: https://build.opensuse.org/request/show/607198 OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=660
This commit is contained in:
parent
19ab3bdb06
commit
eef38bbb12
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon May 14 13:37:38 UTC 2018 - pcerny@suse.com
|
||||
|
||||
- parellelise locales building
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 7 08:32:28 UTC 2018 - wr@rosenauer.org
|
||||
|
||||
|
@ -413,35 +413,31 @@ install -m 644 %{SOURCE6} %{buildroot}%{progdir}/browser/defaults/preferences/kd
|
||||
install -m 644 %{SOURCE9} %{buildroot}%{progdir}/browser/defaults/preferences/firefox.js
|
||||
# install additional locales
|
||||
%if %localize
|
||||
rm -f %{_tmppath}/translations.*
|
||||
touch %{_tmppath}/translations.{common,other}
|
||||
for locale in $(cat $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales) ; do
|
||||
case $locale in
|
||||
ja-JP-mac|en-US|'')
|
||||
;;
|
||||
*)
|
||||
pushd $RPM_BUILD_DIR/compare-locales
|
||||
PYTHONPATH=lib \
|
||||
scripts/compare-locales -m ../l10n-merged/$locale \
|
||||
../%{source_prefix}/browser/locales/l10n.ini ../l10n $locale
|
||||
popd
|
||||
LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
|
||||
make -C browser/locales langpack-$locale
|
||||
cp -rL dist/xpi-stage/locale-$locale \
|
||||
%{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
|
||||
# remove prefs, profile defaults, and hyphenation from langpack
|
||||
rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
|
||||
rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
|
||||
# check against the fixed common list and sort into the right filelist
|
||||
_matched=0
|
||||
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
|
||||
[ "$_match" = "$locale" ] && _matched=1
|
||||
done
|
||||
[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
|
||||
echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \
|
||||
>> %{_tmppath}/translations.$_l10ntarget
|
||||
esac
|
||||
done
|
||||
truncate -s 0 %{_tmppath}/translations.{common,other}
|
||||
sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' $RPM_BUILD_DIR/%{source_prefix}/browser/locales/shipped-locales \
|
||||
| xargs -P 8 -n 1 -I {} /bin/sh -c '
|
||||
locale=$1
|
||||
pushd $RPM_BUILD_DIR/compare-locales
|
||||
PYTHONPATH=lib \
|
||||
scripts/compare-locales -m ../l10n-merged/$locale \
|
||||
../%{source_prefix}/browser/locales/l10n.ini ../l10n $locale
|
||||
popd
|
||||
LOCALE_MERGEDIR=$RPM_BUILD_DIR/l10n-merged/$locale \
|
||||
make -C browser/locales langpack-$locale
|
||||
cp -rL dist/xpi-stage/locale-$locale \
|
||||
%{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org
|
||||
# remove prefs, profile defaults, and hyphenation from langpack
|
||||
rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/defaults
|
||||
rm -rf %{buildroot}%{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org/hyphenation
|
||||
# check against the fixed common list and sort into the right filelist
|
||||
_matched=0
|
||||
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
|
||||
[ "$_match" = "$locale" ] && _matched=1
|
||||
done
|
||||
[ $_matched -eq 1 ] && _l10ntarget=common || _l10ntarget=other
|
||||
echo %{progdir}/browser/extensions/langpack-$locale@firefox.mozilla.org \
|
||||
>> %{_tmppath}/translations.$_l10ntarget
|
||||
' -- {}
|
||||
%endif
|
||||
# remove some executable permissions
|
||||
find %{buildroot}%{progdir} \
|
||||
@ -452,9 +448,10 @@ find %{buildroot}%{progdir} \
|
||||
-name "*.dtd" -o \
|
||||
-name "*.txt" -o \
|
||||
-name "*.xml" -o \
|
||||
-name "*.css" | xargs chmod a-x
|
||||
-name "*.css" \
|
||||
-exec chmod a-x {} +
|
||||
# remove mkdir.done files from installed base
|
||||
find %{buildroot}%{progdir} -name ".mkdir.done" | xargs rm || :
|
||||
find %{buildroot}%{progdir} -type f -name ".mkdir.done" -delete
|
||||
# overwrite the mozilla start-script and link it to /usr/bin
|
||||
mkdir --parents %{buildroot}/usr/bin
|
||||
sed "s:%%PREFIX:%{_prefix}:g
|
||||
|
Loading…
Reference in New Issue
Block a user