aboutsummaryrefslogtreecommitdiffstats
path: root/main/aria2/APKBUILD
blob: f42a92abdc95712269f1c0771de1017930f3a21f (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
55
56
57
58
59
60
61
62
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Jeff Bilyk <jbilyk@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=aria2
pkgver=1.20.0
pkgrel=0
pkgdesc="Download utility for HTTP(S), (S)FTP, Bittorrent, and Metalink"
url="http://aria2.sourceforge.net"
arch="all"
license="GPL2+"
depends="ca-certificates"
depends_dev=""
makedepends="gnutls-dev expat-dev sqlite-dev c-ares-dev"
install=""
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp"
source="https://github.com/tatsuhiro-t/$pkgname/releases/download/release-$pkgver/$pkgname-$pkgver.tar.xz"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-nls \
		--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
	arch="noarch"

	install -Dm644 "$_builddir"/doc/bash_completion/aria2c \
		"$subpkgdir"/usr/share/bash-completion/completions/_aria2c || return 1
}

md5sums="633b9f5c7a6d2a4198174cf895b4a038  aria2-1.20.0.tar.xz"
sha256sums="bf96344b6fee3aada0881ca008b077ea2c5dd820e8f8d693329481ecc7ff8fd0  aria2-1.20.0.tar.xz"
sha512sums="577fbf16567e6554e1b316ae83db35861cc37f98e3e79bb2f3c0bac03f39871e1712cb4cb6c52dd90f0e30b2d469bf8c774c7116223d7e68aef4c3d715439b9b  aria2-1.20.0.tar.xz"