2011-04-11 03:07:13 +00:00
|
|
|
#
|
|
|
|
# spec file for package libtorrent-rasterbar
|
|
|
|
#
|
2020-01-18 20:51:29 +00:00
|
|
|
# Copyright (c) 2020 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
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%define _name libtorrent
|
2019-12-07 14:42:27 +00:00
|
|
|
%define sover 10
|
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
|
2020-09-03 14:15:57 +00:00
|
|
|
Version: 1.2.10
|
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-08-04 18:22:22 +00:00
|
|
|
Source: https://github.com/arvidn/%{_name}/releases/download/%{_name}-%{version}/%{name}-%{version}.tar.gz
|
2020-09-10 18:21:46 +00:00
|
|
|
# PATCH-FIX-UPSTREAM libtorrent-rasterbar-fix_pkgconfig_path.patch
|
|
|
|
Patch0: libtorrent-rasterbar-fix_pkgconfig_path.patch
|
|
|
|
# PATCH-FIX-OPENSUSE libtorrent-rasterbar-fix_library_version.patch
|
|
|
|
Patch1: libtorrent-rasterbar-fix_library_version.patch
|
2020-07-10 18:13:58 +00:00
|
|
|
# for directory ownership
|
|
|
|
BuildRequires: cmake-full
|
2020-09-10 18:21:46 +00:00
|
|
|
BuildRequires: fdupes
|
2011-04-11 03:07:13 +00:00
|
|
|
BuildRequires: gcc-c++
|
2017-03-07 12:15:34 +00:00
|
|
|
BuildRequires: libboost_chrono-devel
|
2020-09-10 18:21:46 +00:00
|
|
|
BuildRequires: libboost_python3-devel
|
2017-03-07 12:15:34 +00:00
|
|
|
BuildRequires: libboost_random-devel
|
|
|
|
BuildRequires: libboost_system-devel
|
2020-09-10 18:21:46 +00:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
BuildRequires: pkgconfig(openssl)
|
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
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%package -n %{name}%{sover}
|
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
|
|
|
|
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
|
|
|
|
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.
|
|
|
|
|
2020-09-10 18:21:46 +00:00
|
|
|
### conditional here? %%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.
|
|
|
|
|
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++
|
2015-06-02 06:25:17 +00:00
|
|
|
Requires: %{name}%{sover} = %{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)
|
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
|
|
|
export CXXFLAGS="-std=c++14"
|
|
|
|
%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-10 18:21:46 +00:00
|
|
|
-Dpython-bindings=ON
|
|
|
|
%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-10 18:21:46 +00:00
|
|
|
%ctest --verbose --exclude-regex "(test_flags|test_resume|test_torrent|test_url_seed|test_upnp)"
|
2016-07-17 21:07:16 +00:00
|
|
|
%endif
|
|
|
|
|
2015-06-02 06:25:17 +00:00
|
|
|
%post -n %{name}%{sover} -p /sbin/ldconfig
|
|
|
|
%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
|
|
|
%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
|