1 | %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
---|
2 | %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
---|
3 | |
---|
4 | Name: libtorrent-rasterbar |
---|
5 | Version: 0.15.4 |
---|
6 | Release: 1%{?_dist_release} |
---|
7 | Summary: A C++ BitTorrent library aiming to be the best alternative |
---|
8 | Summary(ja): 最良の代替手段となることを目指す C++ BitTorrent ライブラリ |
---|
9 | |
---|
10 | Group: System Environment/Libraries |
---|
11 | License: BSD |
---|
12 | URL: http://www.rasterbar.com/products/libtorrent/ |
---|
13 | |
---|
14 | Source0: http://downloads.sourceforge.net/libtorrent/libtorrent-rasterbar-%{version}.tar.gz |
---|
15 | Source1: %{name}-COPYING.Boost |
---|
16 | Source2: %{name}-COPYING.zlib |
---|
17 | |
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
19 | |
---|
20 | BuildRequires: asio-devel |
---|
21 | BuildRequires: libboost-devel libboost-filesystem libboost-program-options |
---|
22 | BuildRequires: libboost-python libboost-regex libboost-system libboost-thread |
---|
23 | BuildRequires: libtool |
---|
24 | BuildRequires: python-devel |
---|
25 | BuildRequires: python-setuptools |
---|
26 | BuildRequires: zlib-devel |
---|
27 | ## Necessary for 'rename'... |
---|
28 | BuildRequires: util-linux-ng |
---|
29 | |
---|
30 | ## The following is taken from it's website listing...mostly. |
---|
31 | %description |
---|
32 | %{name} is a C++ library that aims to be a good alternative to all |
---|
33 | the other BitTorrent implementations around. It is a library and not a full |
---|
34 | featured client, although it comes with a few working example clients. |
---|
35 | |
---|
36 | Its main goals are to be very efficient (in terms of CPU and memory usage) as |
---|
37 | well as being very easy to use both as a user and developer. |
---|
38 | |
---|
39 | |
---|
40 | %package devel |
---|
41 | Summary: Development files for %{name} |
---|
42 | Summary(ja): %{name} の開発ファイル |
---|
43 | Group: Development/Libraries |
---|
44 | License: BSD and zlib and Boost |
---|
45 | Requires: %{name} = %{version}-%{release} |
---|
46 | Requires: pkgconfig |
---|
47 | ## Same include directory. :( |
---|
48 | Conflicts: libtorrent-devel |
---|
49 | ## Needed for various headers used via #include directives... |
---|
50 | Requires: asio-devel |
---|
51 | Requires: libboost-devel |
---|
52 | Requires: openssl-devel |
---|
53 | |
---|
54 | %description devel |
---|
55 | The %{name}-devel package contains libraries and header files for |
---|
56 | developing applications that use %{name}. |
---|
57 | |
---|
58 | The various source and header files included in this package are licensed |
---|
59 | under the revised BSD, zlib/libpng, and Boost Public licenses. See the various |
---|
60 | COPYING files in the included documentation for the full text of these |
---|
61 | licenses, as well as the comments blocks in the source code for which license |
---|
62 | a given source or header file is released under. |
---|
63 | |
---|
64 | |
---|
65 | %package examples |
---|
66 | Summary: Example clients using %{name} |
---|
67 | Summary(ja): %{name} で使用する模範クライアント |
---|
68 | Group: Applications/Internet |
---|
69 | License: BSD |
---|
70 | Requires: %{name} = %{version}-%{release} |
---|
71 | |
---|
72 | %description examples |
---|
73 | The %{name}-examples package contains example clients which intend to |
---|
74 | show how to make use of its various features. (Due to potential |
---|
75 | namespace conflicts, a couple of the examples had to be renamed. See the |
---|
76 | included documentation for more details.) |
---|
77 | |
---|
78 | |
---|
79 | %package python |
---|
80 | Summary: Python bindings for %{name} |
---|
81 | Summary: %{name} の Python バインディング |
---|
82 | Group: Development/Languages |
---|
83 | License: Boost |
---|
84 | Requires: %{name} = %{version}-%{release} |
---|
85 | |
---|
86 | %description python |
---|
87 | The %{name}-python package contains Python language bindings (the 'libtorrent' |
---|
88 | module) that allow it to be used from within Python applications. |
---|
89 | |
---|
90 | |
---|
91 | %prep |
---|
92 | %setup -q -n "libtorrent-rasterbar-%{version}" |
---|
93 | ## The RST files are the sources used to create the final HTML files; and are |
---|
94 | ## not needed. |
---|
95 | rm -f docs/*.rst |
---|
96 | ## Ensure that we get the licenses installed appropriately. |
---|
97 | install -p -m 0644 COPYING COPYING.BSD |
---|
98 | install -p -m 0644 %{SOURCE1} COPYING.Boost |
---|
99 | install -p -m 0644 %{SOURCE2} COPYING.zlib |
---|
100 | ## Finally, ensure that everything is UTF-8, as it should be. |
---|
101 | iconv -t UTF-8 -f ISO_8859-15 AUTHORS -o AUTHORS.iconv |
---|
102 | mv AUTHORS.iconv AUTHORS |
---|
103 | |
---|
104 | |
---|
105 | %build |
---|
106 | ## XXX: Even with the --with-asio=system configure option, the stuff in |
---|
107 | ## the local include directory overrides that of the system. We don't like |
---|
108 | ## local copies of system code. :) |
---|
109 | rm -rf include/libtorrent/asio* |
---|
110 | %configure --disable-static \ |
---|
111 | --enable-examples \ |
---|
112 | --enable-python-binding \ |
---|
113 | --with-asio=system \ |
---|
114 | --with-zlib=system \ |
---|
115 | --with-boost-libdir=%{_libdir} \ |
---|
116 | ; |
---|
117 | # --with-boost-filesystem=boost_filesystem-gcc41-mt-1_36 \ |
---|
118 | # --with-boost-program_options=boost_program_options-gcc41-mt-1_36 \ |
---|
119 | # --with-boost-python=mt \ |
---|
120 | # --with-boost-regex=boost_regex-gcc41-mt-1_36 \ |
---|
121 | # --with-boost-system=boost_system-gcc41-mt-1_36 \ |
---|
122 | # --with-boost-thread=boost_thread-gcc41-mt-1_36 \ |
---|
123 | # --with-zlib=system |
---|
124 | ## Use the system libtool to ensure that we don't get unnecessary RPATH |
---|
125 | ## hacks in our final build. |
---|
126 | make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool |
---|
127 | pushd bindings/python |
---|
128 | ## Fix the interpreter for the example clients |
---|
129 | sed -i -e 's:^#!/bin/python$:#!/usr/bin/python:' {simple_,}client.py |
---|
130 | popd |
---|
131 | |
---|
132 | |
---|
133 | %check |
---|
134 | make check |
---|
135 | |
---|
136 | |
---|
137 | %install |
---|
138 | rm -rf %{buildroot} |
---|
139 | ## Ensure that we preserve our timestamps properly. |
---|
140 | export CPPROG="%{__cp} -p" |
---|
141 | make install DESTDIR=%{buildroot} INSTALL="%{__install} -c -p" |
---|
142 | ## Do the renaming due to the somewhat limited %%_bindir namespace. |
---|
143 | rename client torrent_client %{buildroot}%{_bindir}/* |
---|
144 | |
---|
145 | ## Install the python binding module. |
---|
146 | pushd bindings/python |
---|
147 | %{__python} setup.py install -O1 --skip-build --root %{buildroot} |
---|
148 | popd |
---|
149 | |
---|
150 | |
---|
151 | %clean |
---|
152 | rm -rf %{buildroot} |
---|
153 | |
---|
154 | |
---|
155 | %post -p /sbin/ldconfig |
---|
156 | |
---|
157 | |
---|
158 | %postun -p /sbin/ldconfig |
---|
159 | |
---|
160 | |
---|
161 | %files |
---|
162 | %defattr(-,root,root,-) |
---|
163 | %doc AUTHORS ChangeLog COPYING README |
---|
164 | %exclude %{_libdir}/*.la |
---|
165 | %{_libdir}/libtorrent-rasterbar.so.* |
---|
166 | ## Unfortunately (even with the "--disable-static" option to the %%configure |
---|
167 | ## invocation) our use of the system libtool creates static libraries at build |
---|
168 | ## time, so we must exclude them here. |
---|
169 | %exclude %{_libdir}/*.a |
---|
170 | |
---|
171 | %files devel |
---|
172 | %defattr(-,root,root,-) |
---|
173 | %doc COPYING.Boost COPYING.BSD COPYING.zlib docs/ |
---|
174 | %{_libdir}/pkgconfig/libtorrent-rasterbar.pc |
---|
175 | %{_includedir}/libtorrent/ |
---|
176 | %{_libdir}/libtorrent-rasterbar.so |
---|
177 | |
---|
178 | %files examples |
---|
179 | %{_bindir}/*torrent* |
---|
180 | %{_bindir}/enum_if |
---|
181 | |
---|
182 | %files python |
---|
183 | %defattr(-,root,root,-) |
---|
184 | %doc AUTHORS ChangeLog COPYING.Boost bindings/python/{simple_,}client.py |
---|
185 | %{python_sitearch}/python_libtorrent-%{version}-py?.?.egg-info |
---|
186 | %{python_sitearch}/libtorrent.so |
---|
187 | |
---|
188 | |
---|
189 | %changelog |
---|
190 | * Tue Oct 19 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15.4-1 |
---|
191 | - new upstream release |
---|
192 | |
---|
193 | * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.15.3-2 |
---|
194 | - rebuild with rpm-4.8.1 for pkg-config file |
---|
195 | |
---|
196 | * Tue Sep 7 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15.3-1 |
---|
197 | - new upstream release |
---|
198 | |
---|
199 | * Sat Aug 21 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15.2-1 |
---|
200 | - new upstream release |
---|
201 | |
---|
202 | * Sun Jul 4 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15.1-1 |
---|
203 | - new upstream release |
---|
204 | |
---|
205 | * Sun Mar 21 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.15.0-1 |
---|
206 | - new upstream release |
---|
207 | |
---|
208 | * Thu Mar 18 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.14.9-1 |
---|
209 | - new upstream release |
---|
210 | - applied new naming policy to spec |
---|
211 | |
---|
212 | * Mon Feb 08 2010 Shu KONNO <owa@bg.wakwak.com> 0.14.8-2 |
---|
213 | - rebuilt with new toolchain, python-2.6.4-3 |
---|
214 | |
---|
215 | * Sun Jan 17 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.14.8-1 |
---|
216 | - new upstream release |
---|
217 | |
---|
218 | * Thu Dec 3 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.14.7-1 |
---|
219 | - new upstream release |
---|
220 | |
---|
221 | * Tue Sep 22 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.14.6-1 |
---|
222 | - initial build for VineSeed |
---|
223 | |
---|
224 | * Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 0.14.4-3 |
---|
225 | - rebuilt with new openssl |
---|
226 | |
---|
227 | * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.4-2 |
---|
228 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
229 | |
---|
230 | * Tue Jun 02 2009 Peter Gordon <peter@thecodergeek.com> - 0.14.4-1 |
---|
231 | - Update to new upstream release (0.14.4). |
---|
232 | - Drop outdated Boost patch. |
---|
233 | |
---|
234 | * Fri May 08 2009 Peter Gordon <peter@thecodergeek.com> - 0.14.3-2 |
---|
235 | - Rebuild for the Boost 1.39.0 update. |
---|
236 | |
---|
237 | * Mon Apr 27 2009 Peter Gordon <peter@thecodergeek.com> - 0.14.3-1 |
---|
238 | - Update to new upstream bug-fix release (0.14.3). |
---|
239 | |
---|
240 | * Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.14.2-2 |
---|
241 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
242 | |
---|
243 | * Fri Feb 20 2009 Peter Gordon <peter@thecodergeek.com> - 0.14.2-1 |
---|
244 | - Update to new upstream bug-fix release (0.14.2) |
---|
245 | - Drop Python 2.6 and configure fix patches (fixed upstream): |
---|
246 | - python26.patch |
---|
247 | - configure-dont-use-locate.patch |
---|
248 | |
---|
249 | * Fri Jan 16 2009 Peter Gordon <peter@thecodergeek.com> - 0.14.1-2 |
---|
250 | - Rebuild for the soname bump in openssl-0.9.8j |
---|
251 | |
---|
252 | * Mon Jan 05 2009 Peter Gordon <peter@thecodergeek.com> - 0.14.1-1 |
---|
253 | - Update to new upstream release (0.14.1) |
---|
254 | - Add asio-devel as runtime dependency for the devel subpackage (#478589) |
---|
255 | - Add patch to build with Python 2.6: |
---|
256 | + python26.patch |
---|
257 | - Add patch to make the configure script use the proper python include |
---|
258 | directory instead of calling locate, as that can cause failures in a chroot |
---|
259 | with no db file (and is a bit silly in the first place): |
---|
260 | + configure-dont-use-locate.patch |
---|
261 | - Drop manual setup.py for building the python module (fixed upstream): |
---|
262 | - setup.py |
---|
263 | - Update Source0 URL back to SourceForge's hosting. |
---|
264 | - Reenable the examples, since the Makefiles are fixed. |
---|
265 | |
---|
266 | * Fri Dec 19 2008 Petr Machata <pmachata@redhat.com> - 0.13.1-7 |
---|
267 | - Rebuild for boost-1.37.0. |
---|
268 | |
---|
269 | * Wed Dec 17 2008 Benjamin Kosnik <bkoz@redhat.com> - 0.13.1-6 |
---|
270 | - Rebuild for boost-1.37.0. |
---|
271 | |
---|
272 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.13.1-5 |
---|
273 | - Fix locations for Python 2.6 |
---|
274 | |
---|
275 | * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.13.1-4 |
---|
276 | - Rebuild for Python 2.6 |
---|
277 | |
---|
278 | * Thu Nov 20 2008 Peter Gordon <peter@thecodergeek.com> |
---|
279 | - Update Source0 URL, for now. |
---|
280 | |
---|
281 | * Wed Sep 3 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.13.1-3 |
---|
282 | - fix license tag |
---|
283 | |
---|
284 | * Mon Jul 14 2008 Peter Gordon <peter@thecodergeek.com> - 0.13.1-2 |
---|
285 | - Add python bindings in a -python subpackage. |
---|
286 | |
---|
287 | * Mon Jul 14 2008 Peter Gordon <peter@thecodergeek.com> - 0.13.1-1 |
---|
288 | - Update to new upstream release (0.13.1): Contains an incompatible ABI/API |
---|
289 | bump. |
---|
290 | - Drop GCC 4.3 patch (fixed upstream): |
---|
291 | - gcc43.patch |
---|
292 | - Disable building the examples for now. (Attempted builds fail due to missing |
---|
293 | Makefile support.) |
---|
294 | - Drop the source permissions and pkgconfig file tweaks (fixed upstream). |
---|
295 | |
---|
296 | * Sat Feb 09 2008 Peter Gordon <peter@thecodergeek.com> - 0.12.1-1 |
---|
297 | - Update to new upstream bug-fix release (0.12.1) |
---|
298 | - Rebuild for GCC 4.3 |
---|
299 | - Drop security fix patch (merged upstream): |
---|
300 | - svn1968-bdecode_recursive-security-fix.patch |
---|
301 | - Add GCC 4.3 build fixes (based on patch from Adel Gadllah, bug 432778): |
---|
302 | + gcc43.patch |
---|
303 | |
---|
304 | * Mon Jan 28 2008 Peter Gordon <peter@thecodergeek.com> - 0.12-3 |
---|
305 | - Add upstream patch (changeset 1968) to fix potential security vulnerability: |
---|
306 | malformed messages passed through the bdecode_recursive routine could cause |
---|
307 | a potential stack overflow. |
---|
308 | + svn1968-bdecode_recursive-security-fix.patch |
---|
309 | |
---|
310 | * Fri Aug 03 2007 Peter Gordon <peter@thecodergeek.com> - 0.12-2 |
---|
311 | - Rebuild against new Boost libraries. |
---|
312 | |
---|
313 | * Thu Jun 07 2007 Peter Gordon <peter@thecodergeek.com> - 0.12-1 |
---|
314 | - Update to new upstream release (0.12 Final) |
---|
315 | - Split examples into a subpackage. Applications that use rb_libtorrent |
---|
316 | don't need the example binaries installed; and splitting the package in this |
---|
317 | manner is a bit more friendly to multilib environments. |
---|
318 | |
---|
319 | * Sun Mar 11 2007 Peter Gordon <peter@thecodergeek.com> - 0.12-0.rc1 |
---|
320 | - Update to new upstream release (0.12 RC). |
---|
321 | - Forcibly use the system libtool to ensure that we remove any RPATH hacks. |
---|
322 | |
---|
323 | * Sun Jan 28 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-5 |
---|
324 | - Fix installed pkgconfig file: Strip everything from Libs except for |
---|
325 | '-ltorrent', as its [libtorrent's] DSO will ensure proper linking to other |
---|
326 | needed libraries such as zlib and boost_thread. (Thanks to Michael Schwendt |
---|
327 | and Mamoru Tasaka; bug #221372) |
---|
328 | |
---|
329 | * Sat Jan 27 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-4 |
---|
330 | - Clarify potential licensing issues in the -devel subpackage: |
---|
331 | + COPYING.zlib |
---|
332 | + COPYING.Boost |
---|
333 | - Add my name in the Fedora-specific documentation (README-renames.Fedora) and |
---|
334 | fix some spacing issues in it. |
---|
335 | - Strip the @ZLIB@ (and thus, the extra '-lz' link option) from the installed |
---|
336 | pkgconfig file, as that is only useful when building a statically-linked |
---|
337 | libtorrent binary. |
---|
338 | - Fix conflict: The -devel subpackage should conflict with the -devel |
---|
339 | subpackage of libtorrent, not the main package. |
---|
340 | - Preserve timestamps in %%install. |
---|
341 | |
---|
342 | * Wed Jan 17 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-3 |
---|
343 | - Fix License (GPL -> BSD) |
---|
344 | - Don't package RST (docs sources) files. |
---|
345 | - Only make the -devel subpackage conflict with libtorrent-devel. |
---|
346 | - Rename some of the examples more appropriately; and add the |
---|
347 | README-renames.Fedora file to %%doc which explains this. |
---|
348 | |
---|
349 | * Fri Jan 05 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-2 |
---|
350 | - Add Requires: pkgconfig to the -devel subpackage since it installs a .pc |
---|
351 | file. |
---|
352 | |
---|
353 | * Wed Jan 03 2007 Peter Gordon <peter@thecodergeek.com> - 0.11-1 |
---|
354 | - Initial packaging for Fedora Extras |
---|