diff --git a/libreoffice.spec b/libreoffice.spec index 8726363..6fd445a 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -33,14 +33,10 @@ %bcond_without langpacks %if %{with langpacks} -%if 0%{?rhel} && 0%{?rhel} < 7 -%define langpack_langs en-US af ar as bg bn ca cs cy da de dz el es et eu fi fr ga gl gu he hi hr hu it ja ko kn lt mai ml mr ms nb nl nn nr nso or pa-IN pl pt pt-BR ro ru sh sk sl sr ss st sv ta te th tn tr ts uk ur ve xh zh-CN zh-TW zu -%else -%define langpack_langs en-US af ar as bg bn br ca cs cy da de dz el es et eu fa fi fr ga gl gu he hi hr hu it ja kk ko kn lt lv mai ml mr nb nl nn nr nso or pa-IN pl pt pt-BR ro ru sh si sk sl sr ss st sv ta te th tn tr ts uk ve xh zh-CN zh-TW zu -%endif -%define with_lang --with-lang="%{langpack_langs}" +# generated by %%langpack definitions +%global langpack_langs %{nil} %else -%define langpack_langs en-US +%global langpack_langs en-US %endif Summary: Free Software Productivity Suite @@ -735,7 +731,7 @@ This package provides gdb pretty printers for package %{name}. # Ff: font language dependency # Hh: hunspell dependency # i: additional language added to this package -# L: language code for files +# L: internal (LibreOffice) language code, used in file names # l: language code, e.g., cs # Mm: mythes dependency # n: language name, e.g., Czech @@ -756,9 +752,12 @@ This package provides gdb pretty printers for package %{name}. %define langpack(Aa:c:EFf:Hh:iL:l:Mm:n:p:r:S:s:TXx:Yy:) \ %define project LibreOffice \ %define lang %{-l:%{-l*}}%{!-l:%{error:Language code not defined}} \ +%define _langpack_lang %{-L:%{-L*}}%{!-L:%{lang}} \ %define pkgname langpack-%{lang} \ %define langname %{-n:%{-n*}}%{!-n:%{error:Language name not defined}} \ \ +%global langpack_langs %{langpack_langs} %{_langpack_lang} %{-i:%{-i*}} \ +\ %package %{pkgname} \ Summary: %{langname} language pack for %{project} \ Group: Applications/Productivity \ @@ -776,7 +775,6 @@ Provides additional %{langname} translations and resources for %{project}. \ \ %files %{pkgname} \ %{!-E: \ -%define _langpack_lang %{-L:%{-L*}}%{!-L:%{-l*}} \ %define autotextdir %{baseinstdir}/share/autotext \ %{expand:%%_langpack_common %{_langpack_lang}} \ %{-x:%{autotextdir}/%{-x*}}%{!-x:%{-X:%{autotextdir}/%{_langpack_lang}}} \ @@ -837,7 +835,7 @@ Rules for auto-correcting common %{langname} typing errors. \ %langpack -l de -n German -F -H -Y -M -A -T -X %langpack -l dz -n Dzongkha -F -s ctl -T %langpack -l el -n Greek -F -H -Y -M -T -%langpack -l en -n English -F -H -Y -M -A -E +%langpack -l en -n English -F -H -Y -M -A -E -L en-US %langpack -l es -n Spanish -F -H -Y -M -A -T -X %langpack -l et -n Estonian -F -H -Y -T %langpack -l eu -n Basque -F -H -Y -T @@ -1020,6 +1018,7 @@ sed -i -e /sw_macros_test/d -e /sw_subsequent_.\*port/d sw/Module_sw.mk %build echo build start time is `date`, diskspace: `df -h . | tail -n 1` +echo building localizations: %{langpack_langs} #don't build localized helps which aren't translated POORHELPS=`ls -d translations/source/*/helpcontent2 translations/source/*|cut -f 3 -d /|sort|uniq -u|xargs` #don't build localized helps which are poorly translated @@ -1055,6 +1054,10 @@ export CXXFLAGS=$ARCH_FLAGS %define distrooptions --without-system-hsqldb --enable-kde4 --disable-gstreamer-0-10 --enable-gstreamer --with-system-mythes --with-servlet-api-jar=/usr/share/java/tomcat-servlet-api.jar %endif +%if %{with langpacks} +%define with_lang --with-lang='%{langpack_langs}' +%endif + %if ! 0%{libo_python3} export PYTHON=%{_bindir}/python export PYTHON_CFLAGS=`pkg-config --cflags python`