1
0
libtorrent-rasterbar/libtorrent-rasterbar.spec
Mariusz Fik dd693b4ab1 Accepting request 532910 from home:Fisiu
- Update to 1.1.4:
  * Corrected missing const qualifiers on bdecode_node.
  * Fix changing queue position of paused torrents (1.1.3 regression).
  * Fix re-check issue after move_storage.
  * Handle invalid arguments to set_piece_deadline().
  * Move_storage did not work for torrents without metadata.
  * Improve shutdown time by only announcing to trackers whose IP we know.
  * Fix python3 portability issue in python binding.
  * Delay 5 seconds before reconnecting socks5 proxy for UDP ASSOCIATE.
  * Fix NAT-PMP crash when removing a mapping at the wrong time.
  * Improve path sanitization (filter unicode text direction characters).
  * Deprecate partial_piece_info::piece_state.
  * Bind upnp requests to correct local address.
  * Save resume data when removing web seeds.
  * Fix proxying of https connections.
  * Fix race condition in disk I/O storage class.
  * Fix http connection timeout on multi-homed hosts.
  * Removed depdendency on boost::uintptr_t for better compatibility.
  * Fix memory leak in the disk cache.
  * Fix double free in disk cache.
  * Forward declaring libtorrent types is discouraged. a new fwd.hpp header is
    provided.
- Add boost-1_65-fix.patch: fix building with boost 1.65.
- Drop libtorrent-rasterbar-fix-build-boost-1.54.patch.

OBS-URL: https://build.opensuse.org/request/show/532910
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=96
2017-10-09 21:59:25 +00:00

246 lines
7.0 KiB
RPMSpec

#
# spec file for package libtorrent-rasterbar
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define _name libtorrent
%define sover 9
%define _version 1_1_4
%bcond_with examples
%bcond_with tests
Name: libtorrent-rasterbar
Version: 1.1.4
Release: 0
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
License: BSD-3-Clause
Group: Development/Libraries/C and C++
Url: http://libtorrent.org/
Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{_version}/%{name}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM boost-1_65-fix.patch fisiu@opensuse.org -- Fix building with Boost 1.65.
Patch0: boost-1_65-fix.patch
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python-devel
BuildRequires: pkgconfig(openssl)
%if 0%{?suse_version} > 1320
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_python-devel
BuildRequires: libboost_python3-devel
BuildRequires: libboost_random-devel
BuildRequires: libboost_system-devel
BuildRequires: python3-devel
%else
BuildRequires: boost-devel >= 1.54
# For quadmath.h we need gcc-fortran on openSUSE Leap 14.x and older.
BuildRequires: gcc-fortran
%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.
The main goals of libtorrent-rasterbar are:
* To be cpu efficient.
* To be memory efficient.
* To be very easy to use.
This package holds the sample client and example files for
libtorrent-rasterbar.
%package -n %{name}%{sover}
Summary: Libtorrent is 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.
The main goals of libtorrent-rasterbar are:
* To be cpu efficient.
* To be memory efficient.
* To be very easy to use.
%package -n python2-%{name}
Summary: Python Bindings for libtorrent-rasterbar
# python-libtorrent-rasterbar was last used in openSUSE Leap 14.2.
Group: Development/Libraries/Python
Provides: python-%{name} = %{version}
Obsoletes: python-%{name} < %{version}
%description -n python2-%{name}
Python Bindings for the libtorrent-rasterbar package.
%if 0%{?suse_version} > 1320
%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.
%endif
%if %{with examples}
%package tools
Summary: Example tools from libtorrent-rasterbar
Group: Development/Libraries/C and C++
%description tools
Example tools from the libtorrent-rasterbar package.
%endif
%package devel
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
Group: Development/Libraries/C and C++
Requires: %{name}%{sover} = %{version}
Requires: gcc-c++
Requires: pkgconfig(openssl)
%if 0%{?suse_version} > 1320
Requires: libboost_headers-devel
%else
Requires: boost-devel >= 1.54
%endif
%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.
The main goals of libtorrent-rasterbar are:
* To be cpu efficient.
* To be memory efficient.
* To be very easy to use.
This package holds the development files for libtorrent-rasterbar.
%package doc
Summary: Documentation for libtorrent-rasterbar
Group: Documentation/HTML
%description doc
Documentation for the libtorrent-rasterbar package.
%prep
%setup -q
%patch0 -p0
%build
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
%if 0%{?suse_version} <= 1320
export CXXFLAGS="$CXXFLAGS -std=c++11"
%ifarch aarch64
# Some architectures require explicit linkage to libboost_atomic on boost 1.55 and older.
export LIBS="$LIBS -lboost_atomic"
%endif
%endif
%global _configure ../configure
%if 0%{?suse_version} > 1320
for py in python python3; do
%else
for py in python; do
%endif
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
%make_install -C build-python
%if 0%{?suse_version} > 1320
%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
make check %{?_smp_mflags} V=1 -C build-python
%if 0%{?suse_version} > 1320
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
%defattr(-,root,root)
%{_bindir}/dump_torrent
%{_bindir}/make_torrent
%{_bindir}/simple_client
%endif
%files -n %{name}%{sover}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING
%{_libdir}/%{name}.so.%{sover}*
%files -n python2-%{name}
%defattr(-,root,root)
%{python_sitearch}/%{_name}*.so
%{python_sitearch}/python_%{_name}-*
%if 0%{?suse_version} > 1320
%files -n python3-%{name}
%defattr(-,root,root)
%{python3_sitearch}/%{_name}*.so
%{python3_sitearch}/python_%{_name}-*
%endif
%files devel
%defattr(-,root,root)
%{_includedir}/%{_name}/
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%files doc
%defattr(-,root,root)
%doc %{_docdir}/%{name}/
%changelog