[packages/libtorrent-rasterbar] - drop python2, only user (deluge) switched to puthon3
baggins
baggins at pld-linux.org
Wed Aug 16 10:58:08 CEST 2023
commit 16372049c84e2ca9f024adcf739493f8655bdc91
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Aug 16 09:47:27 2023 +0200
- drop python2, only user (deluge) switched to puthon3
libtorrent-rasterbar.spec | 72 +++++------------------------------------------
1 file changed, 7 insertions(+), 65 deletions(-)
---
diff --git a/libtorrent-rasterbar.spec b/libtorrent-rasterbar.spec
index d57e0c8..4030d12 100644
--- a/libtorrent-rasterbar.spec
+++ b/libtorrent-rasterbar.spec
@@ -1,9 +1,4 @@
# WARNING: qbittorrent 4.1.x uses 1.1.x/1.2.x, not 2.x
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
#
%define tagver %(echo %{version} | tr . _)
Summary: A C++ BitTorrent library
@@ -11,7 +6,7 @@ Summary(hu.UTF-8): C++ BitTorrent könyvtár
Summary(pl.UTF-8): Biblioteka BitTorrenta napisana w C++
Name: libtorrent-rasterbar
Version: 1.2.7
-Release: 8
+Release: 8.1
Epoch: 2
License: BSD
Group: Libraries
@@ -27,16 +22,9 @@ BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: libtool >= 2:2.2.6
BuildRequires: openssl-devel
BuildRequires: pkgconfig >= 1:0.20
-%if %{with python2}
-BuildRequires: boost-python-devel >= 1.58
-BuildRequires: python-devel >= 1:2.4
-BuildRequires: python-modules >= 1:2.4
-%endif
-%if %{with python3}
BuildRequires: boost-python3-devel >= 1.58
BuildRequires: python3-devel >= 1:3.6
BuildRequires: python3-modules >= 1:3.6
-%endif
BuildRequires: rpm-pythonprov
BuildRequires: sed >= 4.0
BuildRequires: util-linux
@@ -45,6 +33,8 @@ BuildRequires: zlib-devel
Obsoletes: rb_libtorrent < 0.13
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+%define boost_py3ver %(echo %{py3_ver} | tr -d .)
+
%description
libtorrent-rasterbar is a C++ library that aims to be a good
alternative to all the other BitTorrent implementations around. It is
@@ -121,23 +111,12 @@ Statikus libtorrent-rasterbar könyvtár.
%description static -l pl.UTF-8
Statyczna biblioteka libtorrent-rasterbar.
-%package -n python-libtorrent-rasterbar
-Summary: Python bindings for libtorrent-rasterbar
-Summary(pl.UTF-8): Wiązania Pythona do biblioteki libtorrent-rasterbar
-Group: Libraries/Python
-Requires: %{name} = %{epoch}:%{version}-%{release}
-
-%description -n python-libtorrent-rasterbar
-Python bindings for libtorrent-rasterbar.
-
-%description -n python-libtorrent-rasterbar -l pl.UTF-8
-Wiązania Pythona do biblioteki libtorrent-rasterbar.
-
%package -n python3-libtorrent-rasterbar
Summary: Python 3 bindings for libtorrent-rasterbar
Summary(pl.UTF-8): Wiązania Pythona 3 do biblioteki libtorrent-rasterbar
Group: Libraries/Python
Requires: %{name} = %{epoch}:%{version}-%{release}
+Obsoletes: python-libtorrent-rasterbar < 2:1.2.7-8
%description -n python3-libtorrent-rasterbar
Python 3 bindings for libtorrent-rasterbar.
@@ -163,49 +142,21 @@ find -type f -regex '.*\.[hc]pp' | xargs chmod a-x
%{__automake}
%configure \
LIBS="-lpthread -lrt" \
+ PYTHON=%{__python3} \
--disable-silent-rules \
- --disable-python-binding \
- --with-asio=system \
+ --enable-python-binding \
--with-boost-libdir=%{_libdir} \
- --with-boost-filesystem=boost_filesystem \
- --with-boost-program-options=boost_program_options \
- --with-boost-regex=boost_regex \
--with-boost-system=boost_system \
- --with-boost-thread=boost_thread \
- --with-libgeoip=system \
- --with-ssl \
- --with-zlib=system
+ --with-boost-python=boost_python%{boost_py3ver}
%{__make}
-cd bindings/python
-
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
-%py3_build
-%endif
-
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-cd bindings/python
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -231,16 +182,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{_libdir}/libtorrent-rasterbar.a
-%if %{with python2}
-%files -n python-libtorrent-rasterbar
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/libtorrent.so
-%{py_sitedir}/python_libtorrent-*.egg-info
-%endif
-
-%if %{with python3}
%files -n python3-libtorrent-rasterbar
%defattr(644,root,root,755)
%attr(755,root,root) %{py3_sitedir}/libtorrent.*.so
%{py3_sitedir}/python_libtorrent-*.egg-info
-%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libtorrent-rasterbar.git/commitdiff/16372049c84e2ca9f024adcf739493f8655bdc91
More information about the pld-cvs-commit
mailing list