summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrançois Andriot <albator78@libertysurf.fr>2021-10-03 11:20:26 +0200
committerFrançois Andriot <albator78@libertysurf.fr>2021-10-31 17:58:32 +0100
commit79e4bc6965ebd47e01f185df9de173b4883ac5bf (patch)
treefe52b6f0543baab1832318d2dbbf056604b0124a
parent0be4bb38e65d682e612205f5865a5529b42dc5f1 (diff)
downloadtde-packaging-79e4bc6965ebd47e01f185df9de173b4883ac5bf.tar.gz
tde-packaging-79e4bc6965ebd47e01f185df9de173b4883ac5bf.zip
RPM: switch kftpgrabber to cmake build
Signed-off-by: François Andriot <albator78@libertysurf.fr>
-rw-r--r--redhat/applications/kftpgrabber/kftpgrabber.spec49
1 files changed, 26 insertions, 23 deletions
diff --git a/redhat/applications/kftpgrabber/kftpgrabber.spec b/redhat/applications/kftpgrabber/kftpgrabber.spec
index 5ac74acd7..549e7309b 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