summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: effd92578c26afb17a6437afb03289d51666ff62 (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
# Contributor: Lucky <archlinux@builds.lucky.li>
## Based on rtorrent [community]
# Maintainer: aksr <aksr at t-com dot me>
pkgname=rtorrent-git
pkgver=0.9.7.r23.gf0207ce
pkgrel=1
pkgdesc="A ncurses BitTorrent client written in C++, based on the libTorrent libraries for Unix."
url="https://github.com/rakshasa/rtorrent/"
license=('GPL')
arch=('i686' 'x86_64')
depends=('curl' 'libtorrent-git' 'xmlrpc-c')
makedepends=('git')
conflicts=('rtorrent')
provides=('rtorrent')
install=${pkgname}.install
source=("$pkgname::git+https://github.com/rakshasa/rtorrent.git")
md5sums=("SKIP")

pkgver() {
  cd "$srcdir/$pkgname"
  git describe --long | sed -r "s/([^-]*-g)/r\1/;s/-/./g;s/^v//"
}

build() {
  cd "$srcdir/$pkgname"
  ./autogen.sh
  export CXXFLAGS="${CXXFLAGS} -std=c++11 -fno-strict-aliasing"
  ./configure --prefix=/usr --enable-debug --with-xmlrpc-c
  make
}

package() {
  cd "$srcdir/$pkgname"
  make DESTDIR="$pkgdir" install
  install -Dm644 doc/faq.xml "$pkgdir/usr/share/doc/rtorrent/faq.xml"
  install -Dm644 doc/old/rtorrent.1 "$pkgdir/usr/share/man/man1/rtorrent.1"
  install -Dm644 doc/rtorrent.rc "$pkgdir/usr/share/doc/rtorrent/rtorrent.rc"
}