From b504f7ef7837e88d471f3601da710a92d58108a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 6 Nov 2022 11:46:08 +0100 Subject: RPM: updates (cherry-pick from TDE R14.0.13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot --- redhat/applications/koffice-i18n/koffice-i18n.spec | 77 ++++++++++++++-------- 1 file changed, 49 insertions(+), 28 deletions(-) (limited to 'redhat/applications/koffice-i18n') diff --git a/redhat/applications/koffice-i18n/koffice-i18n.spec b/redhat/applications/koffice-i18n/koffice-i18n.spec index f71f0fe38..8e1c91577 100644 --- a/redhat/applications/koffice-i18n/koffice-i18n.spec +++ b/redhat/applications/koffice-i18n/koffice-i18n.spec @@ -74,7 +74,7 @@ BuildRequires: desktop-file-utils BuildRequires: findutils BuildRequires: gettext -BuildRequires: autoconf automake libtool m4 +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -573,45 +573,66 @@ Provides: %{name}-tz_TW = %{?epoch:%{epoch}:}%{version}-%{release} %prep %setup -q -n %{name}-%{tde_version}%{?preversion:~%{preversion}} -%__cp -f "/usr/share/aclocal/libtool.m4" "admin/libtool.m4.in" -%__cp -f "/usr/share/libtool/"*"/ltmain.sh" "admin/ltmain.sh" || %__cp -f "/usr/share/libtool/ltmain.sh" "admin/ltmain.sh" - %build +unset QTDIR QTINC QTLIB export PATH="%{tde_bindir}:${PATH}" +export PKG_CONFIG_PATH="%{tde_libdir}/pkgconfig:${PKG_CONFIG_PATH}" + +( +for l in . %{TDE_LANGS}; do + if [ $l != '.' ]; then + pushd "%{tde_pkg}-${l}" + else + pushd ${l} + fi + + if ! rpm -E %%cmake|grep -q "cd build"; then + %__mkdir_p build + cd build + fi + + %cmake \ + -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ + -DCMAKE_C_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_CXX_FLAGS="${RPM_OPT_FLAGS}" \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_SKIP_INSTALL_RPATH=OFF \ + -DCMAKE_INSTALL_RPATH="%{tde_libdir}" \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DWITH_GCC_VISIBILITY=OFF \ + \ + -DCMAKE_INSTALL_PREFIX=%{tde_prefix} \ + -DDATA_INSTALL_DIR=%{tde_datadir}/apps \ + -DLIB_INSTALL_DIR=%{tde_libdir} \ + -DSHARE_INSTALL_PREFIX=%{tde_datadir} \ + \ + -DBUILD_ALL=ON \ + \ + .. + + %__make %{?_smp_mflags} + + popd +done +) 2>&1 | tee /tmp/rpmbuild.$$ -export kde_htmldir="%{tde_tdedocdir}/HTML" +if grep -qw TDE_Error /tmp/rpmbuild.$$; then + echo "Error while building. See '/tmp/rpmbuild.$$'" + exit 1 +fi -for l in %{TDE_LANGS}; do - for f in koffice-i18n-${l}/; do - if [ -d "${f}" ]; then - pushd ${f} - %__sed -i "configure.in" -e "s|AM_CONFIG_HEADER|AC_CONFIG_HEADER|" - %__make -f "admin/Makefile.common" - %configure \ - --prefix=%{tde_prefix} \ - --datadir=%{tde_datadir} \ - --docdir=%{tde_tdedocdir} - %__make %{?_smp_mflags} - popd - fi - done -done +wait +rm -f /tmp/rpmbuild.$$ %install -%__rm -rf %{?buildroot} export PATH="%{tde_bindir}:${PATH}" +%__rm -rf %{buildroot} for l in %{TDE_LANGS}; do - for f in koffice-i18n-${l}/; do - if [ -d "${f}" ] && [ -r "${f}/Makefile" ] ; then - %__make install DESTDIR="%{?buildroot}" -C "${f}" - fi - done + %__make DESTDIR=%{buildroot} -C build install-${l} done -# remove zero-length file -find "%{buildroot}%{tde_tdedocdir}/HTML" -size 0 -exec rm -f {} \; %clean %__rm -rf %{buildroot} -- cgit v1.2.1