2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
# spec file for package libtorrent-rasterbar
|
|
|
|
#
|
2018-01-04 19:32:29 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2011-12-09 15:38:42 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%define _name libtorrent
|
2016-04-14 23:34:39 +00:00
|
|
|
%define sover 9
|
2018-04-17 11:37:03 +00:00
|
|
|
%define _version 1_1_7
|
2017-05-22 10:29:13 +00:00
|
|
|
%bcond_with examples
|
|
|
|
%bcond_with tests
|
2011-04-11 03:07:13 +00:00
|
|
|
Name: libtorrent-rasterbar
|
2018-04-17 11:37:03 +00:00
|
|
|
Version: 1.1.7
|
2011-12-09 09:06:02 +00:00
|
|
|
Release: 0
|
2011-04-11 03:07:13 +00:00
|
|
|
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
|
2011-12-09 09:06:02 +00:00
|
|
|
License: BSD-3-Clause
|
2011-04-11 03:07:13 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-04-17 11:37:03 +00:00
|
|
|
URL: http://libtorrent.org/
|
2015-08-02 12:04:33 +00:00
|
|
|
Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{_version}/%{name}-%{version}.tar.gz
|
2018-04-17 11:37:03 +00:00
|
|
|
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-1.1.7-boost-1.67.patch boo#1089812 -- Add Boost 1.67+ support.
|
|
|
|
Patch0: libtorrent-rasterbar-1.1.7-boost-1.67.patch
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: gcc-c++
|
2016-06-29 19:10:45 +00:00
|
|
|
BuildRequires: pkgconfig
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: pkgconfig(openssl)
|
2018-06-19 12:53:06 +00:00
|
|
|
%if 0%{?suse_version} <= 1500
|
|
|
|
BuildRequires: libboost_python-devel
|
|
|
|
BuildRequires: python-devel
|
|
|
|
%endif
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2017-03-07 12:15:34 +00:00
|
|
|
BuildRequires: libboost_chrono-devel
|
|
|
|
BuildRequires: libboost_python3-devel
|
|
|
|
BuildRequires: libboost_random-devel
|
|
|
|
BuildRequires: libboost_system-devel
|
2016-05-17 07:18:00 +00:00
|
|
|
BuildRequires: python3-devel
|
2016-06-29 19:10:45 +00:00
|
|
|
%else
|
2017-03-07 12:15:34 +00:00
|
|
|
BuildRequires: boost-devel >= 1.54
|
2017-05-23 13:31:53 +00:00
|
|
|
# For quadmath.h we need gcc-fortran on openSUSE Leap 14.x and older.
|
2016-04-14 23:34:39 +00:00
|
|
|
BuildRequires: gcc-fortran
|
|
|
|
%endif
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%description
|
2015-06-02 06:25:17 +00:00
|
|
|
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.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
The main goals of libtorrent-rasterbar are:
|
|
|
|
* To be cpu efficient.
|
|
|
|
* To be memory efficient.
|
|
|
|
* To be very easy to use.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
This package holds the sample client and example files for
|
|
|
|
libtorrent-rasterbar.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%package -n %{name}%{sover}
|
2011-04-11 03:07:13 +00:00
|
|
|
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
|
2015-06-08 08:20:49 +00:00
|
|
|
Group: System/Libraries
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%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.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
The main goals of libtorrent-rasterbar are:
|
|
|
|
* To be cpu efficient.
|
|
|
|
* To be memory efficient.
|
|
|
|
* To be very easy to use.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2018-06-19 12:53:06 +00:00
|
|
|
%if 0%{?suse_version} < 1500
|
|
|
|
%package -n python-%{name}
|
|
|
|
Summary: Python Bindings for libtorrent-rasterbar
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Provides: python2-%{name} = %{version}-%{release}
|
|
|
|
Obsoletes: python2-%{name} < %{version}-%{release}
|
|
|
|
|
|
|
|
%description -n python-%{name}
|
|
|
|
Python Bindings for the libtorrent-rasterbar package.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} == 1500
|
2017-03-07 12:15:34 +00:00
|
|
|
%package -n python2-%{name}
|
2011-04-11 03:07:13 +00:00
|
|
|
Summary: Python Bindings for libtorrent-rasterbar
|
2018-04-17 11:37:03 +00:00
|
|
|
# python-libtorrent-rasterbar was last used in openSUSE Leap 42.2.
|
2017-05-23 12:54:11 +00:00
|
|
|
Group: Development/Libraries/Python
|
2018-06-19 12:53:06 +00:00
|
|
|
Provides: python-%{name} = %{version}-%{release}
|
|
|
|
Obsoletes: python-%{name} < %{version}-%{release}
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2017-03-07 12:15:34 +00:00
|
|
|
%description -n python2-%{name}
|
2015-06-02 06:25:17 +00:00
|
|
|
Python Bindings for the libtorrent-rasterbar package.
|
2018-06-19 12:53:06 +00:00
|
|
|
%endif
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2016-05-16 22:40:57 +00:00
|
|
|
%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.
|
2016-05-17 07:18:00 +00:00
|
|
|
%endif
|
2016-05-16 22:40:57 +00:00
|
|
|
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
2015-06-02 06:25:17 +00:00
|
|
|
%package tools
|
2011-06-07 15:23:03 +00:00
|
|
|
Summary: Example tools from libtorrent-rasterbar
|
|
|
|
Group: Development/Libraries/C and C++
|
2011-06-22 08:47:57 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%description tools
|
2011-06-07 15:23:03 +00:00
|
|
|
Example tools from the libtorrent-rasterbar package.
|
|
|
|
%endif
|
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%package devel
|
|
|
|
Summary: Libtorrent is a C++ implementation of the BitTorrent protocol
|
|
|
|
Group: Development/Libraries/C and C++
|
2015-06-02 06:25:17 +00:00
|
|
|
Requires: %{name}%{sover} = %{version}
|
2017-03-07 12:15:34 +00:00
|
|
|
Requires: gcc-c++
|
|
|
|
Requires: pkgconfig(openssl)
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2017-02-01 16:04:51 +00:00
|
|
|
Requires: libboost_headers-devel
|
|
|
|
%else
|
2016-12-05 16:01:01 +00:00
|
|
|
Requires: boost-devel >= 1.54
|
2017-02-01 16:04:51 +00:00
|
|
|
%endif
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%description devel
|
2015-06-02 06:25:17 +00:00
|
|
|
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.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
The main goals of libtorrent-rasterbar are:
|
|
|
|
* To be cpu efficient.
|
|
|
|
* To be memory efficient.
|
|
|
|
* To be very easy to use.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
This package holds the development files for libtorrent-rasterbar.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for libtorrent-rasterbar
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description doc
|
2015-06-02 06:25:17 +00:00
|
|
|
Documentation for the libtorrent-rasterbar package.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2018-04-17 11:37:03 +00:00
|
|
|
%patch0 -p1
|
2016-04-15 17:40:08 +00:00
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%build
|
2015-06-02 06:25:17 +00:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing"
|
2016-07-03 16:21:10 +00:00
|
|
|
export CXXFLAGS="$CFLAGS"
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} < 1500
|
2016-07-03 16:21:10 +00:00
|
|
|
export CXXFLAGS="$CXXFLAGS -std=c++11"
|
2016-06-21 18:56:30 +00:00
|
|
|
%ifarch aarch64
|
2016-07-03 16:21:10 +00:00
|
|
|
# Some architectures require explicit linkage to libboost_atomic on boost 1.55 and older.
|
|
|
|
export LIBS="$LIBS -lboost_atomic"
|
2016-06-21 18:56:30 +00:00
|
|
|
%endif
|
2016-07-16 12:23:51 +00:00
|
|
|
%endif
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2016-05-16 22:40:57 +00:00
|
|
|
%global _configure ../configure
|
2018-06-19 12:53:06 +00:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
for py in python3; do
|
|
|
|
%else
|
|
|
|
%if 0%{?suse_version} == 1500
|
2016-05-16 22:40:57 +00:00
|
|
|
for py in python python3; do
|
2016-05-17 07:18:00 +00:00
|
|
|
%else
|
|
|
|
for py in python; do
|
2018-06-19 12:53:06 +00:00
|
|
|
%endif
|
2016-05-17 07:18:00 +00:00
|
|
|
%endif
|
2016-05-16 22:40:57 +00:00
|
|
|
mkdir -p "build-$py"
|
|
|
|
pushd "build-$py"
|
|
|
|
export PYTHON="$py"
|
|
|
|
%configure \
|
2018-06-19 12:53:06 +00:00
|
|
|
--disable-static \
|
|
|
|
--disable-silent-rules \
|
|
|
|
--with-libiconv \
|
2016-07-17 21:07:16 +00:00
|
|
|
%if %{with tests}
|
2018-06-19 12:53:06 +00:00
|
|
|
--enable-tests \
|
2016-07-17 21:07:16 +00:00
|
|
|
%endif
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
2018-06-19 12:53:06 +00:00
|
|
|
--enable-examples \
|
2011-06-07 15:23:03 +00:00
|
|
|
%endif
|
2017-05-23 13:31:53 +00:00
|
|
|
--with-boost-python="boost_$py" \
|
2016-05-16 22:40:57 +00:00
|
|
|
--enable-python-binding
|
2016-12-05 16:01:01 +00:00
|
|
|
make %{?_smp_mflags} V=1
|
2016-05-16 22:40:57 +00:00
|
|
|
popd
|
|
|
|
done
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%install
|
2018-06-19 12:53:06 +00:00
|
|
|
%if 0%{?suse_version} <= 1500
|
2016-05-16 22:40:57 +00:00
|
|
|
%make_install -C build-python
|
2018-06-19 12:53:06 +00:00
|
|
|
%endif
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2016-05-16 22:40:57 +00:00
|
|
|
%make_install -C build-python3
|
2016-05-17 07:18:00 +00:00
|
|
|
%endif
|
2016-05-16 22:40:57 +00:00
|
|
|
|
2015-04-16 17:52:27 +00:00
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2015-06-02 06:25:17 +00:00
|
|
|
# Move doc to a separate package.
|
|
|
|
mkdir -p %{buildroot}%{_docdir}/%{name}/
|
|
|
|
cp -r docs/* %{buildroot}%{_docdir}/%{name}/
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2013-12-13 11:42:43 +00:00
|
|
|
%if %{with examples}
|
2016-05-16 22:40:57 +00:00
|
|
|
# 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}
|
2013-12-13 11:42:43 +00:00
|
|
|
%endif
|
|
|
|
|
2016-07-17 21:07:16 +00:00
|
|
|
%if %{with tests}
|
|
|
|
%check
|
2018-06-19 12:53:06 +00:00
|
|
|
%if 0%{?suse_version} <= 1500
|
2016-12-05 16:01:01 +00:00
|
|
|
make check %{?_smp_mflags} V=1 -C build-python
|
2018-06-19 12:53:06 +00:00
|
|
|
%endif
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2016-12-05 16:01:01 +00:00
|
|
|
make check %{?_smp_mflags} V=1 -C build-python3
|
2016-07-17 21:07:16 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%post -n %{name}%{sover} -p /sbin/ldconfig
|
2011-06-22 08:47:57 +00:00
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%postun -n %{name}%{sover} -p /sbin/ldconfig
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
2015-06-02 06:25:17 +00:00
|
|
|
%files tools
|
2011-06-07 15:23:03 +00:00
|
|
|
%{_bindir}/dump_torrent
|
|
|
|
%{_bindir}/make_torrent
|
|
|
|
%{_bindir}/simple_client
|
|
|
|
%endif
|
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%files -n %{name}%{sover}
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
|
|
|
%license COPYING
|
|
|
|
%else
|
|
|
|
%doc COPYING
|
|
|
|
%endif
|
|
|
|
%doc AUTHORS ChangeLog
|
2015-06-02 06:25:17 +00:00
|
|
|
%{_libdir}/%{name}.so.%{sover}*
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2018-06-19 12:53:06 +00:00
|
|
|
%if 0%{?suse_version} < 1500
|
|
|
|
%files -n python-%{name}
|
|
|
|
%{python_sitearch}/%{_name}*.so
|
|
|
|
%{python_sitearch}/python_%{_name}-*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?suse_version} == 1500
|
2017-03-07 12:15:34 +00:00
|
|
|
%files -n python2-%{name}
|
2016-05-16 22:40:57 +00:00
|
|
|
%{python_sitearch}/%{_name}*.so
|
|
|
|
%{python_sitearch}/python_%{_name}-*
|
2018-06-19 12:53:06 +00:00
|
|
|
%endif
|
2016-05-16 22:40:57 +00:00
|
|
|
|
2018-04-17 11:37:03 +00:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2016-05-16 22:40:57 +00:00
|
|
|
%files -n python3-%{name}
|
|
|
|
%{python3_sitearch}/%{_name}*.so
|
|
|
|
%{python3_sitearch}/python_%{_name}-*
|
2016-05-17 07:18:00 +00:00
|
|
|
%endif
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%files devel
|
2015-06-02 06:25:17 +00:00
|
|
|
%{_includedir}/%{_name}/
|
2011-04-11 03:07:13 +00:00
|
|
|
%{_libdir}/%{name}.so
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
%files doc
|
2015-06-02 06:25:17 +00:00
|
|
|
%doc %{_docdir}/%{name}/
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%changelog
|