libtorrent-rasterbar-vl.spec 13 KB

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