From e0394b4bcc3a9ff022cca6e8922b6275810e9d8a Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Tue, 22 Sep 2026 06:27:40 -0300
Subject: RPM ktorrent: update packaging for TDE master
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

RPM ktorrent: update packaging for TDE master

Consolidate the final validated packaging changes for ktorrent from the Tumbleweed build series.

Original commits represented: 3.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 .../applications/internet/ktorrent/ktorrent.spec   | 52 +++++++++++-----------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/redhat/applications/internet/ktorrent/ktorrent.spec b/redhat/applications/internet/ktorrent/ktorrent.spec
index d67deae4f..35b68cf8c 100644
--- a/redhat/applications/internet/ktorrent/ktorrent.spec
+++ b/redhat/applications/internet/ktorrent/ktorrent.spec
@@ -61,7 +61,7 @@ BuildRequires:	trinity-tdebase-devel >= %{tde_version}
 BuildRequires:	desktop-file-utils
 BuildRequires:	gettext
 
-BuildRequires:	autoconf automake libtool m4
+BuildRequires:	trinity-tde-cmake >= %{tde_version}
 BuildRequires:	gcc-c++
 BuildRequires:	pkgconfig
 BuildRequires:	fdupes
@@ -97,9 +97,11 @@ Requires:		avahi
 # GEOIP
 %if 0%{?suse_version}
 %if 0%{?suse_version} < 1550
+%define with_system_geoip 1
 BuildRequires:	libGeoIP-devel
 %endif
 %else
+%define with_system_geoip 1
 BuildRequires:	geoip-devel
 %endif
 
@@ -122,33 +124,31 @@ enabling background downloading.
 %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/config/ltmain.sh" "admin/ltmain.sh" || %__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 QTLIB
 export PATH="%{tde_bindir}:${PATH}"
 
-%configure \
-  --prefix="%{tde_prefix}" \
-  --exec-prefix="%{tde_prefix}" \
-  --bindir="%{tde_bindir}" \
-  --datadir="%{tde_datadir}" \
-  --libdir="%{tde_libdir}" \
-  --mandir="%{tde_mandir}" \
-  --includedir="%{tde_tdeincludedir}" \
-  \
-  --disable-dependency-tracking \
-  --disable-debug \
-  --enable-final \
-  --enable-new-ldflags \
-  --enable-closure \
-  --enable-rpath \
-  --disable-gcc-hidden-visibility \
-  \
-  %{?!with_avahi:--without-avahi}
+%cmake \
+  -DCMAKE_INSTALL_PREFIX=%{tde_prefix} \
+  -DSHARE_INSTALL_PREFIX=%{tde_datadir} \
+  -DLIB_INSTALL_DIR=%{tde_libdir} \
+  -DCMAKE_INSTALL_RPATH=%{tde_libdir} \
+  -DWITH_GCC_VISIBILITY=OFF \
+%if 0%{?with_avahi}
+  -DWITH_ZEROCONF=ON \
+%else
+  -DWITH_ZEROCONF=OFF \
+%endif
+%if 0%{?with_system_geoip}
+  -DWITH_SYSTEM_GEOIP=ON \
+  -DWITH_BUILTIN_GEOIP=OFF \
+%else
+  -DWITH_SYSTEM_GEOIP=OFF \
+  -DWITH_BUILTIN_GEOIP=ON \
+  -DWITH_BUILTIN_FLAGS=ON \
+%endif
+  -DBUILD_DOC=ON \
+  -DBUILD_TRANSLATIONS=ON
 
 
 # Not SMP safe !
@@ -158,7 +158,7 @@ export PATH="%{tde_bindir}:${PATH}"
 %install
 export PATH="%{tde_bindir}:${PATH}"
 %__rm -rf "%{buildroot}"
-%__make install DESTDIR="%{buildroot}"
+%__make install DESTDIR="%{buildroot}" -C build
 
 %find_lang %{tde_pkg}
 
@@ -177,7 +177,7 @@ export PATH="%{tde_bindir}:${PATH}"
 %{tde_bindir}/ktshell
 %{tde_bindir}/kttorinfo
 %{tde_bindir}/ktupnptest
-%{tde_libdir}/libktorrent-%{version}.so
+%{tde_libdir}/libktorrent.so.2*
 %{tde_libdir}/libktorrent.la
 %{tde_tdelibdir}/ktinfowidgetplugin.la
 %{tde_tdelibdir}/ktinfowidgetplugin.so
-- 
cgit v1.2.3

