2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
# spec file for package libtorrent-rasterbar
|
|
|
|
#
|
2022-01-02 08:37:23 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
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.
|
|
|
|
|
2019-01-28 12:20:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
|
2011-12-09 15:38:42 +00:00
|
|
|
|
2021-10-31 12:15:19 +00:00
|
|
|
%ifarch ppc64
|
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
%endif
|
2015-06-02 06:25:17 +00:00
|
|
|
%define _name libtorrent
|
2020-09-17 16:29:19 +00:00
|
|
|
%define libver 2_0
|
|
|
|
%define sover 2.0
|
|
|
|
%define _legacy 1
|
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
|
2021-12-05 08:25:55 +00:00
|
|
|
Version: 2.0.5
|
2011-12-09 09:06:02 +00:00
|
|
|
Release: 0
|
2019-01-28 12:20:53 +00:00
|
|
|
Summary: 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++
|
2019-12-07 14:42:27 +00:00
|
|
|
URL: https://libtorrent.org/
|
2020-11-15 15:31:44 +00:00
|
|
|
Source: https://github.com/arvidn/%{_name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
2022-01-02 08:37:23 +00:00
|
|
|
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-boost_178.patch
|
|
|
|
Patch0: libtorrent-rasterbar-boost_178.patch
|
2020-09-17 16:29:19 +00:00
|
|
|
BuildRequires: cmake >= 3.12.0
|
2020-09-10 18:21:46 +00:00
|
|
|
BuildRequires: fdupes
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: gcc-c++
|
2020-09-17 16:29:19 +00:00
|
|
|
BuildRequires: libboost_chrono-devel >= 1.66
|
|
|
|
BuildRequires: libboost_python3-devel >= 1.66
|
|
|
|
BuildRequires: libboost_random-devel >= 1.66
|
|
|
|
BuildRequires: libboost_system-devel >= 1.66
|
2020-09-10 18:21:46 +00:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
2020-09-17 16:29:19 +00:00
|
|
|
BuildRequires: pkgconfig(openssl) >= 1.0.0
|
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
|
|
|
This package holds the sample client and example files for
|
|
|
|
libtorrent-rasterbar.
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2020-09-17 16:29:19 +00:00
|
|
|
%package -n %{name}%{libver}
|
2019-01-28 12:20:53 +00:00
|
|
|
Summary: 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
|
|
|
|
2020-09-17 16:29:19 +00:00
|
|
|
%description -n %{name}%{libver}
|
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
|
|
|
|
2016-05-16 22:40:57 +00:00
|
|
|
%package -n python3-%{name}
|
|
|
|
Summary: Python Bindings for libtorrent-rasterbar
|
|
|
|
Group: Development/Libraries/Python
|
2020-09-17 16:29:19 +00:00
|
|
|
Conflicts: python3-%{name}-%{_legacy}
|
2016-05-16 22:40:57 +00:00
|
|
|
|
|
|
|
%description -n python3-%{name}
|
|
|
|
Python Bindings for the libtorrent-rasterbar package.
|
|
|
|
|
2020-09-17 16:29:19 +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.
|
2020-09-17 16:29:19 +00:00
|
|
|
%endif
|
2011-06-07 15:23:03 +00:00
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%package devel
|
2019-01-28 12:20:53 +00:00
|
|
|
Summary: Header files for libtorrent, a C++ implementation of the BitTorrent protocol
|
2011-04-11 03:07:13 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2020-09-17 16:29:19 +00:00
|
|
|
Requires: %{name}%{libver} = %{version}
|
2017-03-07 12:15:34 +00:00
|
|
|
Requires: gcc-c++
|
2017-02-01 16:04:51 +00:00
|
|
|
Requires: libboost_headers-devel
|
2020-02-22 17:24:00 +00:00
|
|
|
Requires: pkgconfig(openssl)
|
2020-09-17 16:29:19 +00:00
|
|
|
Conflicts: %{name}-%{_legacy}-devel
|
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
|
|
|
|
|
|
|
This package holds the development files for libtorrent-rasterbar.
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for libtorrent-rasterbar
|
|
|
|
Group: Documentation/HTML
|
2019-01-28 12:20:53 +00:00
|
|
|
BuildArch: noarch
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%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
|
2020-09-10 18:21:46 +00:00
|
|
|
%autosetup -p1
|
2016-04-15 17:40:08 +00:00
|
|
|
|
2011-04-11 03:07:13 +00:00
|
|
|
%build
|
2020-09-10 18:21:46 +00:00
|
|
|
%cmake \
|
2016-07-17 21:07:16 +00:00
|
|
|
%if %{with tests}
|
2020-09-10 18:21:46 +00:00
|
|
|
-Dbuild_tests=ON \
|
2016-07-17 21:07:16 +00:00
|
|
|
%endif
|
2011-06-07 15:23:03 +00:00
|
|
|
%if %{with examples}
|
2020-09-10 18:21:46 +00:00
|
|
|
-Dbuild_examples=ON \
|
2011-06-07 15:23:03 +00:00
|
|
|
%endif
|
2020-09-17 16:29:19 +00:00
|
|
|
-Dpython-bindings=ON \
|
2020-11-15 15:31:44 +00:00
|
|
|
-Dpython-egg-info=ON \
|
2020-09-17 16:29:19 +00:00
|
|
|
-Dboost-python-module-name=python
|
2020-09-10 18:21:46 +00:00
|
|
|
%cmake_build
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%install
|
2020-09-10 18:21:46 +00:00
|
|
|
%cmake_install
|
2016-05-16 22:40:57 +00:00
|
|
|
|
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}
|
2020-09-10 18:21:46 +00:00
|
|
|
install -Dm0755 build/examples/dump_torrent build/examples/make_torrent \
|
|
|
|
build/examples/simple_client -t %{buildroot}%{_bindir}
|
2013-12-13 11:42:43 +00:00
|
|
|
%endif
|
|
|
|
|
2020-09-10 18:21:46 +00:00
|
|
|
%fdupes %{buildroot}%{python3_sitearch}
|
|
|
|
|
2016-07-17 21:07:16 +00:00
|
|
|
%if %{with tests}
|
|
|
|
%check
|
2020-09-17 16:29:19 +00:00
|
|
|
export LD_LIBRARY_PATH=$PWD/build
|
|
|
|
ln -s build/web_server.py .
|
|
|
|
# test_flags until gh#arvidn/libtorrent#4985 is fixed
|
|
|
|
%ctest --verbose --exclude-regex "(test_flags|test_upnp)"
|
2016-07-17 21:07:16 +00:00
|
|
|
%endif
|
|
|
|
|
2020-09-17 16:29:19 +00:00
|
|
|
%post -n %{name}%{libver} -p /sbin/ldconfig
|
2021-09-27 02:05:35 +00:00
|
|
|
|
2020-09-17 16:29:19 +00:00
|
|
|
%postun -n %{name}%{libver} -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
|
|
|
|
|
2020-09-17 16:29:19 +00:00
|
|
|
%files -n %{name}%{libver}
|
2018-04-17 11:37:03 +00:00
|
|
|
%license COPYING
|
|
|
|
%doc AUTHORS ChangeLog
|
2018-11-26 12:31:36 +00:00
|
|
|
%{_libdir}/%{name}.so.%{sover}*
|
2011-04-11 03:07:13 +00:00
|
|
|
|
2016-05-16 22:40:57 +00:00
|
|
|
%files -n python3-%{name}
|
|
|
|
%{python3_sitearch}/%{_name}*.so
|
2020-09-10 18:21:46 +00:00
|
|
|
%{python3_sitearch}/%{_name}.egg-info
|
2011-04-11 03:07:13 +00:00
|
|
|
|
|
|
|
%files devel
|
2020-07-10 18:13:58 +00:00
|
|
|
%{_datadir}/cmake/Modules/FindLibtorrentRasterbar.cmake
|
2015-06-02 06:25:17 +00:00
|
|
|
%{_includedir}/%{_name}/
|
2020-09-10 18:21:46 +00:00
|
|
|
%{_libdir}/cmake/LibtorrentRasterbar
|
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
|