pkgname=aria2 pkgver=1.22.0 pkgrel=1 pkgdesc='Download utility that supports HTTP(S), FTP, BitTorrent, and Metalink.' arch=('x86_64') url='http://aria2.sourceforge.net/' license=('GPL3') depends=('gnutls' 'libxml2' 'sqlite3' 'c-ares' 'ca-certificates' 'libssh2') categories=('network') source=("https://github.com/tatsuhiro-t/aria2/releases/download/release-${pkgver}/${pkgname}-${pkgver}.tar.xz") sha1sums=('6ae60722e65b3270bd9b1785677298e67f1ee4ad') build() { cd ${pkgname}-${pkgver} ./configure \ --prefix=/usr \ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt make } package() { cd ${pkgname}-${pkgver} make DESTDIR="${pkgdir}" install # add bash completion (aria2 automatically installs to a temporary target directory) 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" }