]> git.pld-linux.org Git - packages/libtorrent-rasterbar.git/blob - libtorrent-rasterbar.spec
ff1d06e18b41ad84ec3632e706c4bdf08a10fd43
[packages/libtorrent-rasterbar.git] / libtorrent-rasterbar.spec
1 # WARNING: qbittorrent 4.1.x uses 1.1.x/1.2.x, not 2.x
2 #
3 # Conditional build:
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 #
8 %define         tagver  %(echo %{version} | tr . _)
9 Summary:        A C++ BitTorrent library
10 Summary(hu.UTF-8):      C++ BitTorrent könyvtár
11 Summary(pl.UTF-8):      Biblioteka BitTorrenta napisana w C++
12 Name:           libtorrent-rasterbar
13 Version:        1.2.7
14 Release:        8
15 Epoch:          2
16 License:        BSD
17 Group:          Libraries
18 #Source0Download: https://github.com/arvidn/libtorrent/releases
19 Source0:        https://github.com/arvidn/libtorrent/releases/download/libtorrent_%{tagver}/%{name}-%{version}.tar.gz
20 # Source0-md5:  0c5e9d3c141704d1801f6da65c4554fe
21 URL:            http://www.rasterbar.com/products/libtorrent/
22 BuildRequires:  GeoIP-devel
23 BuildRequires:  autoconf >= 2.63
24 BuildRequires:  automake >= 1:1.11
25 BuildRequires:  boost-devel >= 1.58
26 BuildRequires:  libstdc++-devel >= 6:4.7
27 BuildRequires:  libtool >= 2:2.2.6
28 BuildRequires:  openssl-devel
29 BuildRequires:  pkgconfig >= 1:0.20
30 %if %{with python2}
31 BuildRequires:  boost-python-devel >= 1.58
32 BuildRequires:  python-devel >= 1:2.4
33 BuildRequires:  python-modules >= 1:2.4
34 %endif
35 %if %{with python3}
36 BuildRequires:  boost-python3-devel >= 1.58
37 BuildRequires:  python3-devel >= 1:3.6
38 BuildRequires:  python3-modules >= 1:3.6
39 %endif
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  sed >= 4.0
42 BuildRequires:  util-linux
43 BuildRequires:  which
44 BuildRequires:  zlib-devel
45 Obsoletes:      rb_libtorrent
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 libtorrent-rasterbar is a C++ library that aims to be a good
50 alternative to all the other BitTorrent implementations around. It is
51 a library and not a full featured client, although it comes with a
52 working example client.
53
54 Its main goals are to be very efficient (in terms of CPU and memory
55 usage) as well as being very easy to use both as a user and developer.
56
57 %description -l hu.UTF-8
58 libtorrent-rasterbar egy C++ könyvtár, amely egy jó alternatívája
59 kíván lenni az összes többi BitTorrent implementációjának. Ez "csak"
60 egy könyvtár, és nem egy szolgáltatásgazdag kliens, habár ad egy
61 működő példa-klienst.
62
63 A fő céljai, hogy nagyon hatékony legyen (CPU és memória-használat) és
64 könnyű legyen használni mind a felhasználóknak, mind a fejlesztőknek.
65
66 %description -l pl.UTF-8
67 libtorrent-rasterbar jest napisaną w C++ biblioteką, która aspiruje do
68 bycia dobrą alternatywą dla wszystkich innych implementacji
69 BitTorrenta. Jest to biblioteka a nie pełnoprawny klient, aczkolwiek
70 pakiet zawiera działającego przykładowego klienta.
71
72 Główne cele biblioteki to bycie bardzo efektywną (w rozumieniu
73 wykorzystania procesora i pamięci) jak również łatwą w użyciu zarówno
74 dla użytkownika, jak i programisty.
75
76 %package devel
77 Summary:        Header files for %{name} library
78 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki %{name}
79 License:        BSD, zlib/libpng License, Boost Software License
80 Group:          Development/Libraries
81 Requires:       %{name} = %{epoch}:%{version}-%{release}
82 Requires:       boost-devel >= 1.58
83 Requires:       libstdc++-devel >= 6:4.7
84 Requires:       openssl-devel
85 Obsoletes:      rb_libtorrent-devel
86
87 %description    devel
88 The libtorrent-rasterbar-devel package contains libraries and header
89 files for developing applications that use libtorrent-rasterbar.
90
91 The various source and header files included in this package are
92 licensed under the revised BSD, zlib/libpng, and Boost Public
93 licenses.
94
95 %description devel -l hu.UTF-8
96 A libtorrent-rasterbar-devel csomag tartalmazza a könyvtári és
97 fejlesztői fájlokat, amellyel libtorrent-rasterbar-t használó
98 alkalmazásokat fejleszthetsz.
99
100 %description devel -l pl.UTF-8
101 Pakiet libtorrent-rasterbar-devel zawiera biblioteki i nagłówki do
102 rozwijania aplikacji używających libtorrent-rasterbar.
103
104 Różne pliki źródłowe i nagłówki dostarczone z tym pakietem są
105 licencjonowane pod zmienioną licencją BSD, zlib/libpng i Boost Public
106 License.
107
108 %package static
109 Summary:        Static %{name} library
110 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
111 Group:          Development/Libraries
112 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
113 Obsoletes:      rb_libtorrent-static
114
115 %description static
116 Static libtorrent-rasterbar library.
117
118 %description static -l hu.UTF-8
119 Statikus libtorrent-rasterbar könyvtár.
120
121 %description static -l pl.UTF-8
122 Statyczna biblioteka libtorrent-rasterbar.
123
124 %package -n python-libtorrent-rasterbar
125 Summary:        Python bindings for libtorrent-rasterbar
126 Summary(pl.UTF-8):      Wiązania Pythona do biblioteki libtorrent-rasterbar
127 Group:          Libraries/Python
128 Requires:       %{name} = %{epoch}:%{version}-%{release}
129
130 %description -n python-libtorrent-rasterbar
131 Python bindings for libtorrent-rasterbar.
132
133 %description -n python-libtorrent-rasterbar -l pl.UTF-8
134 Wiązania Pythona do biblioteki libtorrent-rasterbar.
135
136 %package -n python3-libtorrent-rasterbar
137 Summary:        Python 3 bindings for libtorrent-rasterbar
138 Summary(pl.UTF-8):      Wiązania Pythona 3 do biblioteki libtorrent-rasterbar
139 Group:          Libraries/Python
140 Requires:       %{name} = %{epoch}:%{version}-%{release}
141
142 %description -n python3-libtorrent-rasterbar
143 Python 3 bindings for libtorrent-rasterbar.
144
145 %description -n python3-libtorrent-rasterbar -l pl.UTF-8
146 Wiązania Pythona 3 do biblioteki libtorrent-rasterbar.
147
148 %prep
149 %setup -q
150
151 ## Some of the sources and docs are executable, which makes rpmlint against
152 ## the resulting -debuginfo and -devel packages, respectively, quite angry. :]
153 find src docs -type f | xargs chmod a-x
154 find -type f -regex '.*\.[hc]pp' | xargs chmod a-x
155 ## The RST files are the sources used to create the final HTML files; and are
156 ## not needed.
157 %{__rm} docs/*.rst
158
159 %build
160 %{__libtoolize}
161 %{__aclocal} -I m4
162 %{__autoconf}
163 %{__automake}
164 %configure \
165         LIBS="-lpthread -lrt" \
166         --disable-silent-rules \
167         --disable-python-binding \
168         --with-asio=system \
169         --with-boost-libdir=%{_libdir} \
170         --with-boost-filesystem=boost_filesystem \
171         --with-boost-program-options=boost_program_options \
172         --with-boost-regex=boost_regex \
173         --with-boost-system=boost_system \
174         --with-boost-thread=boost_thread \
175         --with-libgeoip=system \
176         --with-ssl \
177         --with-zlib=system
178
179 %{__make}
180
181 cd bindings/python
182
183 %if %{with python2}
184 %py_build
185 %endif
186
187 %if %{with python3}
188 %py3_build
189 %endif
190
191 %install
192 rm -rf $RPM_BUILD_ROOT
193
194 %{__make} install \
195         DESTDIR=$RPM_BUILD_ROOT
196
197 cd bindings/python
198
199 %if %{with python2}
200 %py_install
201
202 %py_postclean
203 %endif
204
205 %if %{with python3}
206 %py3_install
207 %endif
208
209 %clean
210 rm -rf $RPM_BUILD_ROOT
211
212 %post   -p /sbin/ldconfig
213 %postun -p /sbin/ldconfig
214
215 %files
216 %defattr(644,root,root,755)
217 %doc AUTHORS ChangeLog COPYING
218 %attr(755,root,root) %{_libdir}/libtorrent-rasterbar.so.*.*.*
219 %attr(755,root,root) %ghost %{_libdir}/libtorrent-rasterbar.so.10
220
221 %files devel
222 %defattr(644,root,root,755)
223 %doc docs/
224 %attr(755,root,root) %{_libdir}/libtorrent-rasterbar.so
225 %{_libdir}/libtorrent-rasterbar.la
226 %{_includedir}/libtorrent
227 %{_pkgconfigdir}/libtorrent-rasterbar.pc
228 %{_datadir}/cmake/Modules/FindLibtorrentRasterbar.cmake
229
230 %files static
231 %defattr(644,root,root,755)
232 %{_libdir}/libtorrent-rasterbar.a
233
234 %if %{with python2}
235 %files -n python-libtorrent-rasterbar
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{py_sitedir}/libtorrent.so
238 %{py_sitedir}/python_libtorrent-*.egg-info
239 %endif
240
241 %if %{with python3}
242 %files -n python3-libtorrent-rasterbar
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{py3_sitedir}/libtorrent.*.so
245 %{py3_sitedir}/python_libtorrent-*.egg-info
246 %endif
This page took 0.062993 seconds and 2 git commands to generate.