1 |
%define shortname torrent-rasterbar |
2 |
%define major 9 |
3 |
%define libname %mklibname %{shortname} %{major} |
4 |
%define develname %mklibname %{shortname} -d |
5 |
|
6 |
%global binding 1 |
7 |
%define url_ver %(echo %{version}|sed 's/[.]/_/g') |
8 |
|
9 |
# we don't want to provide private python extension libs |
10 |
%global __provides_exclude_from %{python2_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so |
11 |
|
12 |
Summary: The Rasterbar BitTorrent library |
13 |
Name: libtorrent-rasterbar |
14 |
Version: 1.1.6 |
15 |
Release: %mkrel 1 |
16 |
License: BSD |
17 |
Group: System/Libraries |
18 |
URL: http://www.rasterbar.com/products/libtorrent/ |
19 |
Source0: https://github.com/arvidn/libtorrent/releases/download/libtorrent-%{url_ver}/%{name}-%{version}.tar.gz |
20 |
Patch0: libtorrent-rasterbar-1.1.2-link.patch |
21 |
Patch1: rb_libtorrent-1.1.2-system-tommath.patch |
22 |
|
23 |
BuildRequires: boost-devel |
24 |
BuildRequires: pkgconfig(libtommath) |
25 |
BuildRequires: pkgconfig(openssl) |
26 |
BuildRequires: pkgconfig(zlib) |
27 |
BuildRequires: pkgconfig(python2) |
28 |
|
29 |
%description |
30 |
libtorrent-rasterbar is a C++ library that aims to be a good |
31 |
alternative to all the other bittorrent implementations around. It is |
32 |
a library and not a full featured client. It is not the same as the |
33 |
other libtorrent, as used by the 'rtorrent' application, that is in |
34 |
the 'libtorrent' package. The two are completely different and |
35 |
incompatible. |
36 |
|
37 |
%package -n %{libname} |
38 |
Group: System/Libraries |
39 |
Summary: The Rasterbar BitTorrent library |
40 |
|
41 |
%description -n %{libname} |
42 |
libtorrent-rasterbar is a C++ library that aims to be a good |
43 |
alternative to all the other bittorrent implementations around. It is |
44 |
a library and not a full featured client. It is not the same as the |
45 |
other libtorrent, as used by the 'rtorrent' application, that is in |
46 |
the 'libtorrent' package. The two are completely different and |
47 |
incompatible. |
48 |
|
49 |
%package -n python2-%{name} |
50 |
Group: System/Libraries |
51 |
Summary: The Rasterbar BitTorrent library's Python 2 bindings |
52 |
Requires: %{libname} = %{version}-%{release} |
53 |
|
54 |
Obsoletes: python-%{name} < 1.1.2-2 |
55 |
Provides: python-%{name} = %{version}-%{release} |
56 |
|
57 |
%description -n python2-%{name} |
58 |
libtorrent-rasterbar is a C++ library that aims to be a good |
59 |
alternative to all the other bittorrent implementations around. It is |
60 |
a library and not a full featured client. It is not the same as the |
61 |
other libtorrent, as used by the 'rtorrent' application, that is in |
62 |
the 'libtorrent' package. The two are completely different and |
63 |
incompatible. This package contains Python 2 bindings. |
64 |
|
65 |
%package -n %{develname} |
66 |
Group: Development/C |
67 |
Summary: The Rasterbar BitTorrent library's development headers |
68 |
Provides: %{name}-devel = %{version}-%{release} |
69 |
Requires: %{libname} = %{version}-%{release} |
70 |
|
71 |
%description -n %{develname} |
72 |
libtorrent-rasterbar is a C++ library that aims to be a good |
73 |
alternative to all the other bittorrent implementations around. It is |
74 |
a library and not a full featured client. It is not the same as the |
75 |
other libtorrent, as used by the 'rtorrent' application, that is in |
76 |
the 'libtorrent' package. The two are completely different and |
77 |
incompatible. This package contains development libraries and headers. |
78 |
|
79 |
%prep |
80 |
%setup -q |
81 |
%autopatch -p1 |
82 |
|
83 |
%build |
84 |
%configure2_5x \ |
85 |
--disable-static \ |
86 |
%if %binding |
87 |
--enable-python-binding \ |
88 |
%else |
89 |
--disable-python-binding \ |
90 |
%endif |
91 |
--with-boost-libdir=%{_libdir} \ |
92 |
--enable-encryption \ |
93 |
--enable-dht |
94 |
%make_build V=1 |
95 |
|
96 |
%install |
97 |
%make_install |
98 |
|
99 |
# don't ship .la |
100 |
find %{buildroot} -name '*.la' -delete |
101 |
|
102 |
%files -n %{libname} |
103 |
%{_libdir}/*.so.%{major}{,.*} |
104 |
|
105 |
%files -n %{develname} |
106 |
%{_libdir}/*.so |
107 |
%{_includedir}/libtorrent |
108 |
%{_libdir}/pkgconfig/%{name}.pc |
109 |
|
110 |
%if %binding |
111 |
%files -n python2-%{name} |
112 |
%{python2_sitearch}/*.so |
113 |
%{python2_sitearch}/*.egg-info |
114 |
%endif |