From a32d408e0f1d8bbf6489927677c2a1472b0d32d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Andriot?= Date: Sun, 3 Oct 2021 11:20:26 +0200 Subject: [PATCH] RPM: switch kftpgrabber to cmake build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: François Andriot --- .../applications/kftpgrabber/kftpgrabber.spec | 49 ++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/redhat/applications/kftpgrabber/kftpgrabber.spec b/redhat/applications/kftpgrabber/kftpgrabber.spec index 07c03d26e..ed5940cbd 100644 --- a/redhat/applications/kftpgrabber/kftpgrabber.spec +++ b/redhat/applications/kftpgrabber/kftpgrabber.spec @@ -61,7 +61,7 @@ BuildRequires: trinity-tdelibs-devel >= %{tde_version} BuildRequires: trinity-tdebase-devel >= %{tde_version} BuildRequires: desktop-file-utils -BuildRequires: autoconf automake libtool m4 +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: pkgconfig @@ -124,38 +124,40 @@ Requires: %{name} = %{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" -%__make -f "admin/Makefile.common" - %build unset QTDIR QTINC QTDIR export PATH="%{tde_bindir}:${PATH}" -# Warning: --enable-final causes FTBFS -%configure \ - --prefix=%{tde_prefix} \ - --exec-prefix=%{tde_prefix} \ - --bindir=%{tde_bindir} \ - --libdir=%{tde_libdir} \ - --datadir=%{tde_datadir} \ - --includedir=%{tde_tdeincludedir} \ +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_INSTALL_RPATH="%{tde_libdir}" \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DWITH_GCC_VISIBILITY=OFF \ + \ + -DCMAKE_INSTALL_PREFIX=%{tde_prefix} \ + -DINCLUDE_INSTALL_DIR=%{tde_tdeincludedir} \ + -DLIB_INSTALL_DIR=%{tde_libdir} \ + -DSHARE_INSTALL_PREFIX=%{tde_datadir} \ \ - --disable-dependency-tracking \ - --disable-debug \ - --enable-new-ldflags \ - --disable-final \ - --enable-closure \ - --enable-rpath \ - --disable-gcc-hidden-visibility - -%__make %{?_smp_mflags} + -DWITH_ALL_OPTIONS=ON \ + -DBUILD_ALL=ON \ + .. + +%__make %{?_smp_mflags} || %__make %install %__rm -rf $RPM_BUILD_ROOT -%__make install DESTDIR=$RPM_BUILD_ROOT +%__make install DESTDIR=$RPM_BUILD_ROOT -C build %find_lang %{tde_pkg} @@ -188,6 +190,7 @@ export PATH="%{tde_bindir}:${PATH}" %{tde_datadir}/services/kftpimportplugin_ncftp.desktop %{tde_datadir}/servicetypes/kftpbookmarkimportplugin.desktop %{tde_tdedocdir}/HTML/en/kftpgrabber/ +%{tde_mandir}/man1/kftpgrabber.1* %files devel