updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / rtorrent-extended / PKGBUILD
blob79d8b0ca9dca9820ad80b4dc6df0d58426cf3ba2
1 # Maintainer:  Lucky <aur.archlinux.org [at] lucky.take0ver [dot] net>
2 # Contributor: Ashren <edgar [at] archlinux [dot] us>
3 # Contributor: Daenyth <Daenyth [at] gmail [dot] com>
4 # Contributor: Jeff Mickey <jeff@archlinux.org>
5 # Contributor: sh__
7 pkgname=rtorrent-extended
8 _pkgname="rtorrent"
9 #_pkgname="${pkgname%-*}" currently not work with bauerbill
10 pkgver=0.8.6
11 pkgrel=7
12 pkgdesc="Ncurses BitTorrent client based on libTorrent with eXtended patches."
13 arch=("i686" "x86_64")
14 url="http://libtorrent.rakshasa.no"
15 license=("GPL")
16 depends=("curl>=7.14.3" "libtorrent-extended>=0.12.6-7" "xmlrpc-c>=1858")
17 conflicts=("${_pkgname}")
18 provides=("${_pkgname}")
19 install="${pkgname}.install"
20 #eXtended patches {{{
21 _magnet_uri=1
22 _ipv6=1
23 _ip_filter=1
24 _friend=1
25 _bad_peer_handling=1
26 _equal_operator=1
27 # 1 = canvas color patch / 2 = karabja mod patch
28 _interface=1
29 _show_idle_times=1
30 _trackerinfo=1
31 # 1 = tjwoosta vi keybindings / 2 = akston vi keybindings
32 _keybindings=1
33 #}}}
34 source=("${url}/downloads/${_pkgname}-${pkgver}.tar.gz"
35         "ex_magnet_uri.patch"
36         "ex_ipv6.patch"
37         "ex_ip_filter.patch"
38         "ex_friend.patch"
39         "ex_bad_peer_handling.patch"
40         "ex_equal_operator.patch"
41         "ui_canvas_color.patch"
42         "ui_karabaja_mod.patch"
43         "ui_show_idle_times.patch"
44         "ui_trackerinfo.patch"
45         "kb_vi_akston.patch"
46         "kb_vi_tjwoosta.patch"
47         "fix_fatal_exception.patch")
48 md5sums=("b804c45c01c40312926bcea6b55bb084"
49          "d1863ff23b0b17839e3f09b53f217bd8"
50          "dfd7f1344734a6cdeab476213ba90701"
51          "10a4f15d0c2cf122722b6b47a023da2b"
52          "2d6ababca0dee540ae70d764cc4f1fc0"
53          "e698da498f306435fb8f89824c47e0e8"
54          "78cb7da5c0080f0ae67ef3632c3c9b69"
55          "732394d3d2f6e642b4969728e40490ca"
56          "535bbc3747fde174aef3600e304e725a"
57          "611f429ec089e76cabb44161be5ab308"
58          "1fc3b40153450f34f8f4c4e1a161b6b8"
59          "b512babd89e65a94c949088da0745446"
60          "828f38bb78d839765b153ad3e6e09182"
61          "dacf00e1ddf2a27e7661167f193312f3")
63 build() {
64   cd "${srcdir}/${_pkgname}-${pkgver}"
66   #eXtended patches {{{
67   #ex
68   if [[ "${_magnet_uri}" = "1" || "${_ipv6}" = "1" ]]; then
69     echo "ex_magnet_uri.patch"
70     patch -uNp1 -i "${srcdir}/ex_magnet_uri.patch"
71   fi
72   if [[ "${_ipv6}" = "1" ]]; then
73     echo "ex_ip6.patch"
74     patch -uNp1 -i "${srcdir}/ex_ipv6.patch"
75     _cfg_opts="--enable-ipv6"
76   fi
77   if [[ "${_ip_filter}" = "1" || "${_friend}" = "1" ]]; then
78     echo "ex_ip_filter.patch"
79     patch -uNp1 -i "${srcdir}/ex_ip_filter.patch"
80   fi
81   if [[ "${_friend}" = "1" ]]; then
82     echo "ex_friend.patch"
83     patch -uNp1 -i "${srcdir}/ex_friend.patch"
84   fi
85   if [[ "${_bad_peer_handling}" = "1" ]]; then
86     echo "ex_bad_peer_handling.patch"
87     patch -uNp1 -i "${srcdir}/ex_bad_peer_handling.patch"
88   fi
89   if [[ "${_equal_operator}" = "1" ]]; then
90     echo "ex_equal_operator.patch"
91     patch -uNp1 -i "${srcdir}/ex_equal_operator.patch"
92   fi
93   #ui
94   if [[ "${_interface}" = "1" ]]; then
95     echo "ui_canvas_color.patch"
96     patch -uNp1 -i "${srcdir}/ui_canvas_color.patch"
97   elif [[ "${_interface}" = "2" ]]; then
98     echo "ui_karabaja_mod.patch"
99     patch -uNp1 -i "${srcdir}/ui_karabaja_mod.patch"
100   fi
101   if [[ "${_show_idle_times}" = "1" ]]; then
102     echo "ui_show_idle_times.patch"
103     patch -uNp1 -i "${srcdir}/ui_show_idle_times.patch"
104   fi
105   if [[ "${_trackerinfo}" = "1" ]]; then
106     echo "ui_trackerinfo.patch"
107     patch -uNp1 -i "${srcdir}/ui_trackerinfo.patch"
108   fi
109   #kb
110   if [[ "${_keybindings}" = "1" ]]; then
111     echo "kb_vi_tjwoosta.patch"
112     patch -uNp1 -i "${srcdir}/kb_vi_tjwoosta.patch"
113   elif [[ "${_keybindings}" = "2" ]]; then
114     echo "kb_vi_akston.patch"
115     patch -uNp1 -i "${srcdir}/kb_vi_akston.patch"
116   fi
117   #}}}
119   echo "fix_fatal_exception.patch"
120   patch -uNp1 -i "${srcdir}/fix_fatal_exception.patch"
122   sed -i 's/rTorrent \" VERSION/rTorrent-eXtended " VERSION/' \
123     "src/ui/download_list.cc"
125   ./autogen.sh
126   CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing" \
127     ./configure --prefix=/usr --disable-debug --with-xmlrpc-c "${_cfg_opts}"
128   make
129   make DESTDIR="${pkgdir}" install
131 # vim:set ts=2 sw=2 et: