8
0
Files
libtorrent-rasterbar/libtorrent-rasterbar.spec
Luigi Baldoni 3f4acd7c81 - Update to version 2.0.11
* bump version for future release
  * torrent_status::num_pieces counts pieces passed hash check
  * Updated numerous action revisions
  * fix setup.py to not use distutils
  * fix integer overflow in piece picker
  * Send read_piece_alert after piece passes
  * test for set_piece_deadline()
  * Make anti-leech choker never increase score for dishonesty
  * fix the compilation failure caused
  * bump libsimulator submodule
  * assume copy_file_range() exists on linux (unless old glibc)
  * rely on the openssl version already installed on the runner
  * remove aligned storage, as it's deprecated in C++23
  * apply DSCP setting to peers before connecting
  * check settings_pack::max_out_request_queue before alert
    outstanding_r…
  * improve debug facilities of swarm simulations
  * Improve simulator determinism
  * fix issue when closing a uTP connection
  * fix test_copy_file to recognize overlayfs as supporting
    sparse files.
  * Fix some typos
  * don't discard netlink messages for previously seen addresses
  * fix pre-allocation when changing priority
  * limit the piece size in create_torrent constructor
  * Updated numerous pre-commit hook revs.
  * fix BEP-40 peer priority for IPv6
  * minor fix on documentation
  * allow connections while checking resume data if
    no_verify_files flag is set
  * don't hint POSIX_FADV_RANDOM
  * fix tests to work on linux ZFS
  * fix bug where file_progress could sometimes be reported as
    >100%
  * Move construct std::shared_ptr objects
  * Bump libsimulator submodule
  * fix performance bug in the file pool
  * piece_picker updates
  * Add announce_port support
  * fix race condition when cancelling requests after becoming a
    seed
  * abort_download() is OK in any state
  * Bump some pre-commit-hook revs
  * Fix mmap error when reading empty file during resume check
    on Linux
  * homebrew uses standard name for pre-built boost_system now
  * remove use of std::aligned_union
  * bump version
  * Fix typos
  * add some possible values to the documentation for
    dht_bootstrap_nodes
  * fix applying IP filter to DHT traffic (HanabishiRecca)
  * add invariant check to socks5_stream
  * fix fcntl.h warning
  * use stricter rules for what filenames are valid on Android
  * validate add_torrent_params::save_path at run-time

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libtorrent-rasterbar?expand=0&rev=178
2025-01-28 13:18:02 +00:00

186 lines
5.2 KiB
RPMSpec

#
# spec file for package libtorrent-rasterbar
#
# Copyright (c) 2025 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 libver 2_0
%define sover 2.0
%define _legacy 1
%bcond_with examples
%bcond_with tests
Name: libtorrent-rasterbar
Version: 2.0.11
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: %{name}-%{version}.tar.xz
BuildRequires: cmake >= 3.12.0
BuildRequires: fdupes
BuildRequires: gcc-c++
%if 0%{?suse_version} > 1500
BuildRequires: libboost_chrono-devel
BuildRequires: libboost_python3-devel
BuildRequires: libboost_random-devel
BuildRequires: libboost_system-devel
%else
BuildRequires: libboost_chrono1_75_0-devel
BuildRequires: libboost_python-py3-1_75_0-devel
BuildRequires: libboost_random1_75_0-devel
BuildRequires: libboost_system1_75_0-devel
%endif
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: pkgconfig(openssl) >= 1.0.0
%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}%{libver}
Summary: A C++ implementation of the BitTorrent protocol
Group: System/Libraries
%description -n %{name}%{libver}
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 python3-%{name}
Summary: Python Bindings for libtorrent-rasterbar
Group: Development/Libraries/Python
Conflicts: python3-%{name}-%{_legacy}
%description -n python3-%{name}
Python Bindings for the libtorrent-rasterbar package.
%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: Header files for libtorrent, a C++ implementation of the BitTorrent protocol
Group: Development/Libraries/C and C++
Requires: %{name}%{libver} = %{version}
Requires: gcc-c++
%if 0%{?suse_version} > 1500
Requires: libboost_headers-devel
%else
Requires: libboost_headers1_75_0-devel
%endif
Requires: pkgconfig(openssl)
Conflicts: %{name}-%{_legacy}-devel
%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
%autosetup -p1
%build
%cmake \
%if %{with tests}
-Dbuild_tests=ON \
%endif
%if %{with examples}
-Dbuild_examples=ON \
%endif
-Dpython-bindings=ON \
-Dpython-egg-info=ON \
-Dboost-python-module-name=python3
%cmake_build
%install
%cmake_install
# Move doc to a separate package.
mkdir -p %{buildroot}%{_docdir}/%{name}/
cp -r docs/* %{buildroot}%{_docdir}/%{name}/
%if %{with examples}
install -Dm0755 build/examples/dump_torrent build/examples/make_torrent \
build/examples/simple_client -t %{buildroot}%{_bindir}
%endif
%fdupes %{buildroot}%{python3_sitearch}
%if %{with tests}
%check
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)"
%endif
%post -n %{name}%{libver} -p /sbin/ldconfig
%postun -n %{name}%{libver} -p /sbin/ldconfig
%if %{with examples}
%files tools
%{_bindir}/dump_torrent
%{_bindir}/make_torrent
%{_bindir}/simple_client
%endif
%files -n %{name}%{libver}
%license COPYING
%doc AUTHORS ChangeLog
%{_libdir}/%{name}.so.%{sover}*
%files -n python3-%{name}
%{python3_sitearch}/%{_name}*.so
%{python3_sitearch}/%{_name}.egg-info
%files devel
%{_datadir}/cmake/Modules/FindLibtorrentRasterbar.cmake
%{_includedir}/%{_name}/
%{_libdir}/cmake/LibtorrentRasterbar
%{_libdir}/%{name}.so
%{_libdir}/pkgconfig/%{name}.pc
%files doc
%doc %{_docdir}/%{name}/
%changelog