summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24a77a1d253778a20cb7e9b713915cfc63f06783 (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
# Maintainer: qdesjardin <qdesjardin gmail com>

_pkgname=libtorrent
pkgname=libtorrent-ps-ch
_pkgver=0.13.8
pkgver=1.8.3
pkgrel=3
pkgdesc='BitTorrent library written in C++ for use with rtorrent-ps-ch'
license=('GPL2')
arch=('x86_64')
url='https://github.com/rakshasa/libtorrent'
depends=('autoconf' 'automake' 'openssl' 'zlib')
provides=('libtorrent')
conflicts=('libtorrent' 'libtorrent-ps')
source=("https://github.com/rakshasa/$_pkgname/archive/v$_pkgver.tar.gz"
        'backport_lt_all_01-partially_done_and_choke_group_fix.patch'
	'backport_lt_all_02-honor_system_file_allocate_fix.patch'
	'lt-ps_all_02-better-bencode-errors_all.patch')
md5sums=('dd184eadb8b449ddc6c3498a93ddd568'
         '2a8eb09877e81e3e72bd544c27b45dbb'
         '4797c5abf04dca2468178bc85244d076'
         'dfae06b33afa738211619040810be8b4')

prepare() {
  cd "$srcdir/$_pkgname-$_pkgver"

  for corepatch in "$srcdir"/lt-ps_*.patch; do
    test ! -e "$corepatch" || { msg2 "$(basename $corepatch)"; patch -uNp1 -i "$corepatch"; }
  done

  for backport in "$srcdir"/{backport,misc}_lt_*.patch; do
    test ! -e "$backport" || { msg2 "$(basename $backport)"; patch -uNp1 -i "$backport"; }
  done

  ./autogen.sh
}

build() {
  cd "$srcdir/$_pkgname-$_pkgver"

  ./configure \
    --prefix=/usr \
    --disable-debug
  make
}

package() {
  cd "$srcdir/$_pkgname-$_pkgver"
  make DESTDIR="$pkgdir" install
}