]> git.pld-linux.org Git - packages/libtorrent-rasterbar.git/blobdiff - libtorrent-rasterbar.spec
up to 2.0.10 (new soname)
[packages/libtorrent-rasterbar.git] / libtorrent-rasterbar.spec
index 3c3564ac39c77e09feb1b60a6ce021e969ffacd3..1a9f7b163acd1cce548277a00f9d0f808d9e0828 100644 (file)
@@ -2,33 +2,35 @@ Summary:      A C++ BitTorrent library
 Summary(hu.UTF-8):     C++ BitTorrent könyvtár
 Summary(pl.UTF-8):     Biblioteka BitTorrenta napisana w C++
 Name:          libtorrent-rasterbar
-Version:       0.14.7
+Version:       2.0.10
 Release:       1
+Epoch:         2
 License:       BSD
 Group:         Libraries
-Source0:       http://downloads.sourceforge.net/libtorrent/%{name}-%{version}.tar.gz
-# Source0-md5: 6959f719245d82758235fd73d93373b2
+#Source0Download: https://github.com/arvidn/libtorrent/releases
+Source0:       https://github.com/arvidn/libtorrent/releases/download/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: bfe6fff84add3dc5d51e10547f85e217
 URL:           http://www.rasterbar.com/products/libtorrent/
-Patch0:                bashizm.patch
-BuildRequires: GeoIP-devel
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: boost-devel >= 1.35.0
-BuildRequires: boost-python-devel
-BuildRequires: libstdc++-devel
-BuildRequires: libtool
+BuildRequires: boost-devel >= 1.67
+BuildRequires: boost-python3-devel >= 1.67
+BuildRequires: cmake >= 3.16.0
+BuildRequires: libstdc++-devel >= 6:5
 BuildRequires: openssl-devel
 BuildRequires: pkgconfig >= 1:0.20
-BuildRequires: python-devel
-BuildRequires: python-modules
+BuildRequires: python3 >= 1:3.6
+BuildRequires: python3-devel >= 1:3.6
+BuildRequires: python3-modules >= 1:3.6
+BuildRequires: python3-setuptools
 BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.605
 BuildRequires: sed >= 4.0
-BuildRequires: util-linux-ng
-BuildRequires: which
+BuildRequires: util-linux
 BuildRequires: zlib-devel
-Obsoletes:     rb_libtorrent
+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
@@ -62,10 +64,12 @@ Summary:    Header files for %{name} library
 Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki %{name}
 License:       BSD, zlib/libpng License, Boost Software License
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-Requires:      boost-devel
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      boost-devel >= 1.67
+Requires:      libstdc++-devel >= 6:5
 Requires:      openssl-devel
-Obsoletes:     rb_libtorrent-devel
+Obsoletes:     libtorrent-rasterbar-static < 2:2.0.10
+Obsoletes:     rb_libtorrent-devel < 0.13
 
 %description    devel
 The libtorrent-rasterbar-devel package contains libraries and header
@@ -88,34 +92,21 @@ Różne pliki źródłowe i nagłówki dostarczone z tym pakietem są
 licencjonowane pod zmienioną licencją BSD, zlib/libpng i Boost Public
 License.
 
-%package static
-Summary:       Static %{name} library
-Summary(pl.UTF-8):     Statyczna biblioteka %{name}
-Group:         Development/Libraries
-Requires:      %{name}-devel = %{version}-%{release}
-Obsoletes:     rb_libtorrent-static
-
-%description static
-Static libtorrent-rasterbar library.
-
-%description static -l hu.UTF-8
-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
+%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} = %{version}-%{release}
+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.
 
-%description -n python-libtorrent-rasterbar
-Python bindings for libtorrent-rasterbar.
+%description -n python3-libtorrent-rasterbar -l pl.UTF-8
+Wiązania Pythona 3 do biblioteki libtorrent-rasterbar.
 
 %prep
 %setup -q
-%patch0 -p1
-%{__sed} -i 's/ACLOCAL_AMFLAGS = -I m4/#ACLOCAL_AMFLAGS = -I m4/' Makefile.am
 
 ## Some of the sources and docs are executable, which makes rpmlint against
 ## the resulting -debuginfo and -devel packages, respectively, quite angry. :]
@@ -123,38 +114,20 @@ find src docs -type f | xargs chmod a-x
 find -type f -regex '.*\.[hc]pp' | xargs chmod a-x
 ## The RST files are the sources used to create the final HTML files; and are
 ## not needed.
-rm -f docs/*.rst
+%{__rm} docs/*.rst
 
 %build
-%{__libtoolize}
-%{__aclocal} -I m4
-%{__autoconf}
-%{__automake}
-%configure \
-       LIBS="-lpthread" \
-       --enable-python-binding \
-       --with-boost-system=boost_system \
-       --with-boost-filesystem=boost_filesystem \
-       --with-boost-thread=boost_thread \
-       --with-boost-regex=boost_regex \
-       --with-boost-program-options=boost_program_options \
-       --with-asio=system \
-       --with-zlib=system \
-       --with-libgeoip=system \
-       --with-ssl
-
-%{__make}
+%cmake -B build \
+       -Dpython-bindings:BOOL=ON \
+       -Dpython-egg-info:BOOL=ON
+
+%{__make} -C build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-## Ensure that we preserve our timestamps properly.
-#export CPPROG="%{__cp} -p"
-#make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -c -p"
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
 
-## Do the renaming due to the somewhat limited %{_bindir} namespace.
-rename client torrent_client $RPM_BUILD_ROOT%{_bindir}/*
+%{__make} -C build install \
+       DESTDIR=$RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -164,22 +137,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog COPYING README
-%attr(755,root,root) %{_libdir}/libtorrent-rasterbar.so*
+%doc AUTHORS ChangeLog COPYING
+%attr(755,root,root) %{_libdir}/libtorrent-rasterbar.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libtorrent-rasterbar.so.2.0
 
 %files devel
 %defattr(644,root,root,755)
 %doc docs/
 %attr(755,root,root) %{_libdir}/libtorrent-rasterbar.so
-%{_libdir}/libtorrent-rasterbar.la
-%{_pkgconfigdir}/libtorrent-rasterbar.pc
 %{_includedir}/libtorrent
+%{_pkgconfigdir}/libtorrent-rasterbar.pc
+%{_datadir}/cmake/Modules/FindLibtorrentRasterbar.cmake
+%{_libdir}/cmake/LibtorrentRasterbar
 
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libtorrent-rasterbar.a
-
-%files -n python-libtorrent-rasterbar
+%files -n python3-libtorrent-rasterbar
 %defattr(644,root,root,755)
-%{py_sitedir}/libtorrent.so
-%{py_sitedir}/python_libtorrent-*.egg-info
+%attr(755,root,root) %{py3_sitedir}/libtorrent.*.so
+%{py3_sitedir}/libtorrent.egg-info
This page took 0.111602 seconds and 4 git commands to generate.