1
0
libtorrent-rasterbar/libtorrent-rasterbar.spec

216 lines
6.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libtorrent-rasterbar
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define _name libtorrent
%define sover 10
%bcond_without python2
%bcond_without python3
%bcond_with examples
%bcond_with tests
Name: libtorrent-rasterbar
Version: 1.2.10
Release: 0
Summary: A C++ implementation of the BitTorrent protocol
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: https://libtorrent.org/
Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{version}/%{name}-%{version}.tar.gz
Accepting request 819847 from home:alois:branches:devel:libraries:c_c++ - Update to version 1.2.7 * add set_alert_fd in python binding, to supersede set_alert_notify * fix bug in part files > 2 GiB * add function to clear the peer list for a torrent * fix resume data functions to save/restore more torrent flags * limit number of concurrent HTTP announces * fix queue position for force_rechecking a torrent that is not auto-managed * improve rate-based choker documentation, and minor tweak * undeprecate upnp_ignore_nonrouters (but refering to devices on our subnet) * increase default tracker timeout * retry failed socks5 server connections * allow UPnP lease duration to be changed after device discovery version 1.2.6: * fix peer timeout logic * simplify proxy handling. A proxy now overrides listen_interfaces * fix issues when configured to use a non-default choking algorithm * fix issue in reading resume data * revert NXDOMAIN change from 1.2.4 * don't open any listen sockets if listen_interfaces is empty or misconfigured * fix bug in auto disk cache size logic * fix issue with outgoing_interfaces setting, where bind() would be called twice * add build option to disable share-mode * support validation of HTTPS trackers * deprecate strict super seeding mode * make UPnP port-mapping lease duration configurable * deprecate the bittyrant choking algorithm * add build option to disable streaming version 1.2.5: * announce port=1 instead of port=0, when there is no listen port * fix LSD over IPv6 * support TCP_NOTSENT_LOWAT * fix correct interface binding of local service discovery multicast * fix issue with knowing which interfaces to announce to trackers and DHT * undeprecate settings_pack::dht_upload_rate_limit OBS-URL: https://build.opensuse.org/request/show/819847 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=128
2020-07-10 18:13:58 +00:00
# for directory ownership
BuildRequires: cmake-full
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(openssl)
%if %{with python2}
BuildRequires: python-devel
%endif
%if %{with python3}
BuildRequires: python3-devel
%endif
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_random-devel
BuildRequires: libboost_system-devel
%if %{with python2}
BuildRequires: libboost_python-devel
%endif
%if %{with python3}
BuildRequires: libboost_python3-devel
%endif
%description
libtorrent-rasterbar is a C++ library that aims to be a good
alternative to all the other bittorrent implementations around.
It is a library and not a full featured client, although it comes
with a working example client.
This package holds the sample client and example files for
libtorrent-rasterbar.
%package -n %{name}%{sover}
Summary: A C++ implementation of the BitTorrent protocol
Group: System/Libraries
%description -n %{name}%{sover}
libtorrent-rasterbar is a C++ library that aims to be a good
alternative to all the other bittorrent implementations around.
It is a library and not a full featured client, although it comes
with a working example client.
%package -n python2-%{name}
Summary: Python Bindings for libtorrent-rasterbar
# python-libtorrent-rasterbar was last used in openSUSE Leap 42.2.
Group: Development/Libraries/Python
Provides: python-%{name} = %{version}-%{release}
Obsoletes: python-%{name} < %{version}-%{release}
%description -n python2-%{name}
Python Bindings for the libtorrent-rasterbar package.
%package -n python3-%{name}
Summary: Python Bindings for libtorrent-rasterbar
Group: Development/Libraries/Python
%description -n python3-%{name}
Python Bindings for the libtorrent-rasterbar package.
%package tools
Summary: Example tools from libtorrent-rasterbar
Group: Development/Libraries/C and C++
%description tools
Example tools from the libtorrent-rasterbar package.
%package devel
Summary: Header files for libtorrent, a C++ implementation of the BitTorrent protocol
Group: Development/Libraries/C and C++
Requires: %{name}%{sover} = %{version}
Requires: gcc-c++
Requires: libboost_headers-devel
Requires: pkgconfig(openssl)
%description devel
libtorrent-rasterbar is a C++ library that aims to be a good
alternative to all the other bittorrent implementations around.
It is a library and not a full featured client, although it comes
with a working example client.
This package holds the development files for libtorrent-rasterbar.
%package doc
Summary: Documentation for libtorrent-rasterbar
Group: Documentation/HTML
BuildArch: noarch
%description doc
Documentation for the libtorrent-rasterbar package.
%prep
%setup -q
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
%global _configure ../configure
for py in %{?with_python2:python} %{?with_python3:python3}; do
mkdir -p "build-$py"
pushd "build-$py"
export PYTHON="$py"
%configure \
--disable-static \
--disable-silent-rules \
--with-libiconv \
%if %{with tests}
--enable-tests \
%endif
%if %{with examples}
--enable-examples \
%endif
--with-boost-python="boost_$py" \
--enable-python-binding
make %{?_smp_mflags} V=1
popd
done
%install
%if %{with python2}
%make_install -C build-python
%endif
%if %{with python3}
%make_install -C build-python3
%endif
find %{buildroot} -type f -name "*.la" -delete -print
# Move doc to a separate package.
mkdir -p %{buildroot}%{_docdir}/%{name}/
cp -r docs/* %{buildroot}%{_docdir}/%{name}/
%if %{with examples}
# Drop tests binaries from the libtorrent-rasterbar-tools subpackage.
rm -v %{buildroot}%{_bindir}/{client_test,connection_tester,enum_if} \
%{buildroot}%{_bindir}/{fragmentation_test,parse_hash_fails} \
%{buildroot}%{_bindir}/{parse_request_log,rss_reader,upnp_test,utp_test}
%endif
%if %{with tests}
%check
%if %{with python2}
make check %{?_smp_mflags} V=1 -C build-python
%endif
%if %{with python3}
make check %{?_smp_mflags} V=1 -C build-python3
%endif
%endif
%post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig
%if %{with examples}
%files tools
%{_bindir}/dump_torrent
%{_bindir}/make_torrent
%{_bindir}/simple_client
%endif
%files -n %{name}%{sover}
%license COPYING
%doc AUTHORS ChangeLog
%{_libdir}/%{name}.so.%{sover}*
%if %{with python2}
%files -n python2-%{name}
%{python_sitearch}/%{_name}*.so
%{python_sitearch}/python_%{_name}-*
%endif
%if %{with python3}
%files -n python3-%{name}
%{python3_sitearch}/%{_name}*.so
%{python3_sitearch}/python_%{_name}-*
%endif
%files devel
Accepting request 819847 from home:alois:branches:devel:libraries:c_c++ - Update to version 1.2.7 * add set_alert_fd in python binding, to supersede set_alert_notify * fix bug in part files > 2 GiB * add function to clear the peer list for a torrent * fix resume data functions to save/restore more torrent flags * limit number of concurrent HTTP announces * fix queue position for force_rechecking a torrent that is not auto-managed * improve rate-based choker documentation, and minor tweak * undeprecate upnp_ignore_nonrouters (but refering to devices on our subnet) * increase default tracker timeout * retry failed socks5 server connections * allow UPnP lease duration to be changed after device discovery version 1.2.6: * fix peer timeout logic * simplify proxy handling. A proxy now overrides listen_interfaces * fix issues when configured to use a non-default choking algorithm * fix issue in reading resume data * revert NXDOMAIN change from 1.2.4 * don't open any listen sockets if listen_interfaces is empty or misconfigured * fix bug in auto disk cache size logic * fix issue with outgoing_interfaces setting, where bind() would be called twice * add build option to disable share-mode * support validation of HTTPS trackers * deprecate strict super seeding mode * make UPnP port-mapping lease duration configurable * deprecate the bittyrant choking algorithm * add build option to disable streaming version 1.2.5: * announce port=1 instead of port=0, when there is no listen port * fix LSD over IPv6 * support TCP_NOTSENT_LOWAT * fix correct interface binding of local service discovery multicast * fix issue with knowing which interfaces to announce to trackers and DHT * undeprecate settings_pack::dht_upload_rate_limit OBS-URL: https://build.opensuse.org/request/show/819847 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=128
2020-07-10 18:13:58 +00:00
%{_datadir}/cmake/Modules/FindLibtorrentRasterbar.cmake
%{_includedir}/%{_name}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%files doc
%doc %{_docdir}/%{name}/
%changelog