diff --git a/libreoffice.spec b/libreoffice.spec index 23057c4ef35c9ce8bf5815903c062e4ecb84192d..c869a0f29026bc59d5746b8ee2a5bd926248b8ed 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -18,7 +18,11 @@ # fedpkg compile/install/local/mockbuild does not handle --without ATM, # so it is necessary to change this to bcond_with to achieve the same # effect -%bcond_without langpacks +# +# 2025-02-28 NOTE: so we can't build many languages +# due to openEuler's hard time limit for building (3h) +# So we only ship en-US & zh-CN & zh-TW for now - 251 +%bcond_with langpacks # 'serverconfig' is tuned for non-interactive installs # defaults off except on aarch64 @@ -46,7 +50,7 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 Version: %{libo_version}.2 -Release: 1 +Release: 3 # default new files are: MPLv2 # older files are typically: MPLv2 incorporating work under ASLv2 # nlpsolver is: LGPLv3 @@ -190,7 +194,7 @@ BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xmlsec1-nss) BuildRequires: pkgconfig(xt) -#!BuildIgnore: zlib zlib-devel +BuildRequires: zlib-devel BuildRequires: unixODBC-devel # libs / headers - conditional @@ -942,7 +946,12 @@ Rules for auto-correcting common %{langname} typing errors. \ #langpack -l uk -n Ukrainian -F -H -Y -M -T -X %langpack -l ve -n Venda -F -H -X %langpack -l xh -n Xhosa -F -H -X +#langpack -l zu -n Zulu -F -H -Y -X +%undefine langpack_lang + +%endif +# Move the Chinese language pack here because see the top of the file %define langpack_lang Simplified Chinese %langpack -l zh-Hans -n %{langpack_lang} -f zh_CN -a zh -p zh_CN -s cjk -T -L zh-CN -x zh-CN -g zh_CN %{baseinstdir}/share/template/common/l10n/zh_CN_ott_normal.ott @@ -950,11 +959,8 @@ Rules for auto-correcting common %{langname} typing errors. \ %define langpack_lang Traditional Chinese %langpack -l zh-Hant -n %{langpack_lang} -f zh_TW -a zh -p zh_TW -s cjk -T -L zh-TW -x zh-TW -g zh_TW -#langpack -l zu -n Zulu -F -H -Y -X %undefine langpack_lang -%endif - %autocorr -l en -n English %if %{with langpacks} @@ -997,10 +1003,12 @@ Rules for auto-correcting common %{langname} typing errors. \ %autocorr -l tr -n Turkish %autocorr -l vi -n Vietnamese %autocorr -l vro -n Võro -%autocorr -l zh -n Chinese %endif +# Move the Chinese language pack here because see the top of the file +%autocorr -l zh -n Chinese + %define make_autocorr_aliases(l:) \ %{?-l: \ for lang in %{*}; do \ @@ -1066,9 +1074,10 @@ export CXXFLAGS="$ARCH_FLAGS -I%{_includedir}/zxcvbn -I%{_includedir}/KF6/KConfi %define javaoptions --without-java %endif -%if %{with langpacks} +# We will always have zh-CN and zh-TW +#if %{with langpacks} %define with_lang --with-lang='%{langpack_langs}' -%endif +#endif aclocal -I m4 autoconf @@ -1163,13 +1172,14 @@ if ! make instsetoo_native PKGFORMAT=installed DISABLE_STRIP=1 EPM=not-used-but- fi install -m 0755 -d %{buildroot}%{baseinstdir} mv $WORKDIR/installation/LibreOffice/installed/install/en-US/* %{buildroot}%{baseinstdir} -%if %{with langpacks} +# We will always have zh-CN and zh-TW +#if %{with langpacks} for langpack in $WORKDIR/installation/LibreOffice_languagepack/installed/install/*; do [ `basename $langpack` = log ] && continue cp -rp $langpack/* %{buildroot}%{baseinstdir} rm -rf $langpack done -%endif +#endif mv $WORKDIR/installation/LibreOffice_SDK/installed/install/en-US/sdk %{buildroot}%{sdkinstdir} chmod -R +w %{buildroot}%{baseinstdir} @@ -1227,7 +1237,16 @@ pushd %{buildroot}%{baseinstdir}/share/autocorr %make_autocorr_aliases -l nl-NL nl-AW %make_autocorr_aliases -l sv-SE sv-FI %else -rm -f acor_[a-df-z]*.dat acor_e[lsu]*.dat +# We need to remove other languages' autocorrect files +# But keep acor_zh-CN and acor_zh-TW +for i in acor_*.dat; do + case "$i" in + acor_zh-CN.dat|acor_zh-TW.dat|acor_en*.dat) continue;; + *) rm -f "$i";; + esac +done +# Otherwise please use this +#rm -f acor_[a-df-z]*.dat acor_e[lsu]*.dat %endif popd # Make these shared across multiple applications @@ -1453,7 +1472,13 @@ rm -f %{buildroot}%{baseinstdir}/program/officebean.abignore %endif %check -make unitcheck slowcheck +# Due to openEuler's hard time limit for building (3h) +# so we can't run the full test suite here - 251 +make unitcheck +# If we can run the full test suite, we should run the following +# instead of the above line - 251 +#make unitcheck slowcheck + # we don't need this anymore rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar @@ -2143,5 +2168,11 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &>/dev/null || : %{_includedir}/LibreOfficeKit %changelog -* Sun Apr 07 2024 misaka00251 - 24.2.2.1-1 +* Fri Feb 28 2025 misaka00251 - 24.2.3.2-2 +- Only keep zh-CN & zh-TW language packs +- Disable slowcheck in spec file +- Fix zilb not found error +- Fix changelog + +* Sun Apr 07 2024 misaka00251 - 24.2.3.2-1 - Init package for openEuler