updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / libtorrent-extended / PKGBUILD
blob58f89196706f93dae1fe03be83ec72f88b27c2bb
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__
6 pkgname=libtorrent-extended
7 _pkgname="libtorrent"
8 #_pkgname="${pkgname%-*}" # currently not work with bauerbill
9 pkgver=0.12.6
10 pkgrel=7
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         "fix_gcc_4.6.0.patch")
33 md5sums=('037499ed708aaf72988cee60e5a8d96b'
34          'e14c2ca84bb38895702793fff316e2ea'
35          '930c4422882823b3e9ed43998b61a187'
36          'ae3a8d3d75dbaafc166e1c052b42a92d'
37          '3db101335191d0dec33284953b44dc3d'
38          'a004776b18bff7968c56eadc7f3de7d2'
39          '5fb33c09086bfd6b731e04beaba6d615')
41 build() {
42   cd "${srcdir}/${_pkgname}-${pkgver}"
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   #}}}
68   echo "fix_gcc_4.6.0.patch"
69   patch -uNp1 -i "${srcdir}/fix_gcc_4.6.0.patch"
71   ./autogen.sh
72   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" \
73     ./configure --prefix=/usr --disable-debug "${_cfg_opts}"
74   make
75   make DESTDIR="${pkgdir}" install
77 # vim:set ts=2 sw=2 et: