libtorrent-rasterbar-vl.spec 14 KB

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