Репозиторий Sisyphus
Последнее обновление: 11 ноября 2019 | Пакетов: 17527 | Посещений: 15697660
en ru br
Репозитории ALT

Группа :: Система/Библиотеки
Пакет: libtorrent-rasterbar

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1

%def_disable debug
%def_disable static
%def_with python2

%define upname libtorrent-rasterbar
%define soname 9

Name: libtorrent-rasterbar
Epoch: 3
Version: 1.1.13
Release: alt2

Summary: libTorrent is a BitTorrent library written in C++ for *nix
License: BSD
Group: System/Libraries

Url: https://www.rasterbar.com/products/libtorrent/
# https://github.com/arvidn/libtorrent.git
Source: %name-%version.tar
Patch: %name-1.1.9-fedora-system-tommath.patch

BuildRequires(pre): rpm-build-python3
BuildRequires: libssl-devel
BuildRequires: gcc-c++ zlib-devel
BuildRequires: glibc-devel glibc-core
BuildRequires: boost-devel boost-asio-devel boost-filesystem
BuildRequires: boost-filesystem-devel boost-program_options-devel
BuildRequires: boost-multiprecision-devel
BuildRequires: python3-devel boost-python3-devel
BuildRequires: libGeoIP-devel
BuildRequires: libtommath-devel

%if_with python2
BuildRequires: python-devel boost-python-devel
%endif

%description
libTorrent is designed to avoid redundant copying and storing of data
that other clients and libraries suffer from. libTorrent features:

* The client has full control over the polling of sockets.
* Sigc++ signals makes it easy for the client to react to events.
* Fast resume which checks the file modification time.
* Direct reading and writing from network to mmap'ed files.
* File hash check uses the same thread; client can control the rate;
 non-blocking and preload to memory with the mincore and madvise.
* File handler: fine-grained use of file read/write permissions, allows
 seeding of read-only files; allows torrents with unlimited number of
 files; opens closed files when mapping chunks to memory, with graceful
 error handling; support for files larger than 2 GB; different download
 priorities for files in the torrent.
* Multi-tracker support.
* No dependency on any specific HTTP library, the client implements a
 wrapper class.
* Dynamic request pipe size.
* Upload and download throttle.
* And much more...

%package -n %name%soname
Summary: libTorrent is a BitTorrent library written in C++ for *nix
Group: System/Libraries
# TODO: remove this obsolete on next soname change
Obsoletes: %name <= 3:1.1.9-alt1

%description -n %name%soname
libTorrent is designed to avoid redundant copying and storing of data
that other clients and libraries suffer from. libTorrent features:

* The client has full control over the polling of sockets.
* Sigc++ signals makes it easy for the client to react to events.
* Fast resume which checks the file modification time.
* Direct reading and writing from network to mmap'ed files.
* File hash check uses the same thread; client can control the rate;
 non-blocking and preload to memory with the mincore and madvise.
* File handler: fine-grained use of file read/write permissions, allows
 seeding of read-only files; allows torrents with unlimited number of
 files; opens closed files when mapping chunks to memory, with graceful
 error handling; support for files larger than 2 GB; different download
 priorities for files in the torrent.
* Multi-tracker support.
* No dependency on any specific HTTP library, the client implements a
 wrapper class.
* Dynamic request pipe size.
* Upload and download throttle.
* And much more...

%package -n %upname-devel
Summary: Development libraries and header files for libTorrent
Group: Development/C++
Requires: %name%soname = %EVR
Provides: libtorrent-rasterbar8-devel = %EVR
Conflicts: libtorrent-rasterbar8-devel < %EVR
Obsoletes: libtorrent-rasterbar8-devel < %EVR
Conflicts: libtorrent-rasterbar7-devel < %EVR
Obsoletes: libtorrent-rasterbar7-devel < %EVR
Conflicts: libtorrent-devel

%description -n %upname-devel
The libtorrent-devel package contains libraries and header files needed
to develop applications using libTorrent.

%if_enabled static
%package -n %upname-devel-static
Summary: Development static libraries for libTorrent
Group: Development/C++
Requires: %name%soname = %EVR
Provides: libtorrent-rasterbar7-devel-static = %EVR
Conflicts: libtorrent-rasterbar7-devel-static < %EVR

%description -n %upname-devel-static
The libtorrent-devel package contains static libraries needed
to develop applications using libTorrent.
%endif

%if_with python2
%package -n python-module-%upname
Summary: libTorrent python bindings
Group: Development/Python
Requires: %name%soname = %EVR
Provides: python-module-libtorrent-rasterbar7 = %EVR
Conflicts: python-module-libtorrent-rasterbar7 < %EVR

%description -n python-module-%upname
The python-module-libtorrent-rasterbar contains
python bindings to libTorrent.
%endif

%package -n python3-module-%upname
Summary: libTorrent python bindings
Group: Development/Python3
Requires: %name%soname = %EVR

%description -n python3-module-%upname
The python3-module-libtorrent-rasterbar contains
python-3 bindings to libTorrent.

%prep
%setup
%patch -p1

mkdir -p build-aux
touch build-aux/config.rpath

%if_with python2
cp -r . ../build-python2
%endif

%build
%add_optflags -fno-strict-aliasing -DTORRENT_USE_WSTRING=1 -DTORRENT_EXPORT_EXTRA=1
%add_optflags -I%_includedir/tommath

%if_with python2
pushd ../build-python2

export PYTHON=%_bindir/python2

%ifarch %e2k
# -std=c++03 by default as of lcc 1.23.20
%add_optflags -std=c++11
%endif

%autoreconf
%configure \
%{subst_enable static} \
%{subst_enable debug} \
--with-boost-libdir=%_libdir \
--enable-python-binding \
--with-boost-python=boost_python%{python_version_nodots python2} \
%nil

%make_build V=1
popd
%endif

export PYTHON=%_bindir/python3

%autoreconf
%configure \
%{subst_enable static} \
%{subst_enable debug} \
--with-boost-libdir=%_libdir \
--enable-python-binding \
--with-boost-python=boost_python%{python_version_nodots python3} \
%nil

%make_build V=1

%install
%if_with python2
pushd ../build-python2/bindings/python
%python_install
popd
%endif

%makeinstall_std

rm -f %buildroot%_libdir/*.la
%if_disabled static
rm -f %buildroot%_libdir/*.a
%endif

%files -n %name%soname
%doc AUTHORS ChangeLog NEWS README.rst
%doc COPYING LICENSE
%_libdir/*.so.*

%files -n %upname-devel
%_includedir/*
%_libdir/*.so
%_pkgconfigdir/*

%if_enabled static
%files -n %upname-devel-static
%_libdir/*.a
%endif

%if_with python2
%files -n python-module-%upname
%python_sitelibdir/libtorrent.so
%python_sitelibdir/*.egg-info
%endif

%files -n python3-module-%upname
%python3_sitelibdir/libtorrent*.so
%python3_sitelibdir/*.egg-info

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin