summaryrefslogtreecommitdiff
path: root/community/aria2/PKGBUILD
blob: 41502f8c35ad2e8c20bbf0bc45c85b4772bb6ad1 (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
# $Id: PKGBUILD 116412 2014-07-27 08:00:32Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Thomas Dziedzic < gostrc at gmail >
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=aria2
pkgver=1.18.7
pkgrel=2
pkgdesc='Download utility that supports HTTP(S), FTP, BitTorrent, and Metalink'
arch=('i686' 'x86_64')
url='http://aria2.sourceforge.net/'
license=('GPL')
depends=('gnutls' 'libxml2' 'sqlite' 'c-ares' 'ca-certificates')
checkdepends=('cppunit')
source=("http://downloads.sourceforge.net/aria2/aria2-$pkgver.tar.xz"
        https://github.com/tatsuhiro-t/aria2/commit/c659fe939df2b0830f83f39429d6e7814ac82157.patch)
sha256sums=('7944336efdfc82892802bec304698448e8d27b30f30496576716e8b93ebfff98'
            '1225cde7db20d185188de752edebd4f76c73e4806793d7d139031788bf9434eb')

prepare() {
  cd $pkgname-$pkgver

  # https://github.com/tatsuhiro-t/aria2/issues/265
  patch -p1 -i ../c659fe939df2b0830f83f39429d6e7814ac82157.patch
}

build() {
  cd $pkgname-$pkgver

  ./configure \
    --prefix=/usr \
    --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt

  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

  # add bash completion
  install -d "$pkgdir"/usr/share/bash-completion/completions
  install -m644 "$pkgdir"/usr/share/doc/aria2/bash_completion/aria2c \
    "$pkgdir"/usr/share/bash-completion/completions
  rm -rf "$pkgdir"/usr/share/doc/aria2/bash_completion
}