Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD

By: a guest on Apr 28th, 2011  |  syntax: None  |  size: 2.24 KB  |  views: 177  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # Maintainer.: Lucky <aur.archlinux.org [at] lucky.take0ver [dot] net>
  2. # Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com>
  3. # Contributor: Jeff Mickey <jeff@archlinux.org>
  4. # Contributor: sh__
  5.  
  6. pkgname=libtorrent-extended
  7. _pkgname="libtorrent"
  8. #_pkgname="${pkgname%-*}" # currently not work with bauerbill
  9. pkgver=0.12.6
  10. pkgrel=6
  11. pkgdesc="BitTorrent library written in C++ with eXtended patches."
  12. arch=("i686" "x86_64")
  13. url="http://libtorrent.rakshasa.no"
  14. license=("GPL")
  15. depends=("libsigc++" "openssl")
  16. conflicts=("${_pkgname}")
  17. provides=("${_pkgname}")
  18. options=("!libtool")
  19. #eXtended patches {{{
  20. _magnet_uri=1
  21. _ipv6=1
  22. _friend=1
  23. _bad_peer_handling=1
  24. _show_idle_times=1
  25. #}}}
  26. source=("${url}/downloads/${_pkgname}-${pkgver}.tar.gz"
  27.         "ex_magnet_uri.patch"
  28.         "ex_ipv6.patch"
  29.         "ex_friend.patch"
  30.         "ex_bad_peer_handling.patch"
  31.         "ui_show_idle_times.patch"
  32.         "compile2.patch")
  33. md5sums=("037499ed708aaf72988cee60e5a8d96b"
  34.          "e14c2ca84bb38895702793fff316e2ea"
  35.          "930c4422882823b3e9ed43998b61a187"
  36.          "ae3a8d3d75dbaafc166e1c052b42a92d"
  37.          "3db101335191d0dec33284953b44dc3d"
  38.          "a004776b18bff7968c56eadc7f3de7d2"
  39.          "b2bec67487abf74238d6d81b1a7cd666")
  40.  
  41. build() {
  42.   cd "${srcdir}/${_pkgname}-${pkgver}"
  43.  
  44.   #eXtended patches {{{
  45.   if [[ "${_magnet_uri}" = "1" || "${_ipv6}" = "1" ]]; then
  46.     echo "ex_magnet_uri.patch"
  47.     patch -uNp1 -i "${srcdir}/ex_magnet_uri.patch"
  48.   fi
  49.   if [[ "${_ipv6}" = "1" ]]; then
  50.     echo "ex_ipv6.patch"
  51.     patch -uNp1 -i "${srcdir}/ex_ipv6.patch"
  52.     _cfg_opts="--enable-ipv6"
  53.   fi
  54.   if [[ "${_friend}" = "1" ]]; then
  55.     echo "ex_friend.patch"
  56.     patch -uNp1 -i "${srcdir}/ex_friend.patch"
  57.   fi
  58.   if [[ "${_bad_peer_handling}" = "1" ]]; then
  59.     echo "ex_bad_peer_handling.patch"
  60.     patch -uNp1 -i "${srcdir}/ex_bad_peer_handling.patch"
  61.   fi
  62.   if [[ "${_show_idle_times}" = "1" ]]; then
  63.     echo "ui_show_idle_times.patch"
  64.     patch -uNp1 -i "${srcdir}/ui_show_idle_times.patch"
  65.   fi
  66.   #}}}
  67.  
  68.   patch -Np1 -i "${srcdir}/compile2.patch"
  69.  
  70.   ./autogen.sh
  71.   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" \
  72.     ./configure --prefix=/usr --disable-debug "${_cfg_opts}"
  73.   make
  74.   make DESTDIR="${pkgdir}" install
  75. }
  76. # vim:set ts=2 sw=2 et: