summaryrefslogtreecommitdiff
path: root/pcr/libtorrent-extended/PKGBUILD
blob: 8f6c490085bfc270d610d80ccd5bf7a17182676b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Maintainer : Aurelien Desbrieres <aurelien@hackers.camp>
# Contributor: Lucky <aur.archlinux.org [at] lucky.take0ver [dot] net>
# Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com>
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: sh__

pkgname=libtorrent-extended
_pkgname="libtorrent"
#_pkgname="${pkgname%-*}" # currently not work with bauerbill
pkgver=0.12.6
pkgrel=7
pkgdesc="BitTorrent library written in C++ with eXtended patches."
arch=("i686" "x86_64")
url="http://libtorrent.rakshasa.no"
license=("GPL")
depends=("libsigc++" "openssl")
conflicts=("${_pkgname}")
provides=("${_pkgname}")
options=("!libtool")
#eXtended patches {{{
_magnet_uri=1
_ipv6=1
_friend=1
_bad_peer_handling=1
_show_idle_times=1
#}}}
source=("${url}/downloads/${_pkgname}-${pkgver}.tar.gz"
        "ex_magnet_uri.patch"
        "ex_ipv6.patch"
        "ex_friend.patch"
        "ex_bad_peer_handling.patch"
        "ui_show_idle_times.patch"
        "fix_gcc_4.6.0.patch")

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"

  #eXtended patches {{{
  if [[ "${_magnet_uri}" = "1" || "${_ipv6}" = "1" ]]; then
    echo "ex_magnet_uri.patch"
    patch -uNp1 -i "${srcdir}/ex_magnet_uri.patch"
  fi
  if [[ "${_ipv6}" = "1" ]]; then
    echo "ex_ipv6.patch"
    patch -uNp1 -i "${srcdir}/ex_ipv6.patch"
    _cfg_opts="--enable-ipv6"
  fi
  if [[ "${_friend}" = "1" ]]; then
    echo "ex_friend.patch"
    patch -uNp1 -i "${srcdir}/ex_friend.patch"
  fi
  if [[ "${_bad_peer_handling}" = "1" ]]; then
    echo "ex_bad_peer_handling.patch"
    patch -uNp1 -i "${srcdir}/ex_bad_peer_handling.patch"
  fi
  if [[ "${_show_idle_times}" = "1" ]]; then
    echo "ui_show_idle_times.patch"
    patch -uNp1 -i "${srcdir}/ui_show_idle_times.patch"
  fi
  #}}}

  echo "fix_gcc_4.6.0.patch"
  patch -uNp1 -i "${srcdir}/fix_gcc_4.6.0.patch"

  ./autogen.sh
  CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" \
    ./configure --prefix=/usr --disable-debug "${_cfg_opts}"
  make
  make DESTDIR="${pkgdir}" install
}
# vim:set ts=2 sw=2 et: