aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tor/APKBUILD
blob: d8e8717d90af5e7496e4d73fbc2106f7cd703808 (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
63
64
65
66
# Contributor: Sam Dodrill <shadow.h511@gmail.com>
# Maintainer: Sam Dodrill <shadow.h511@gmail.com>
pkgname=tor
pkgver=0.2.6.9
pkgrel=0
pkgdesc="Anonymous network connectivity"
url="https://www.torproject.org"
arch="all"
license="BSD"
pkgusers="tor"
depends=""
depends_dev="bash libevent-dev openssl-dev ca-certificates"
makedepends="$depends_dev"
install="$pkgname.pre-install"
subpackages="$pkgname-doc"
source="https://www.torproject.org/dist/$pkgname-$pkgver.tar.gz
	tor.initd
	tor.confd
	"

_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 \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	rm -f "$pkgdir"/usr/lib/*.la
	mkdir -p "$pkgdir"/var/lib/$pkgname
	chown $pkgusers "$pkgdir"/var/lib/$pkgname
	install -m755 -D "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1
	install -m644 -D "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname || return 1
}

md5sums="4a1b334c30d7b37ea72fa33425220d5d  tor-0.2.6.9.tar.gz
c10b84a88dfaff4c17e40d04edd2caf3  tor.initd
e05a796ffc4981c22c167de11fa36ef9  tor.confd"
sha256sums="4a6c29ad89a98d7832c599d9480d6d8e55355fb3b8f4b506c5df557f15942f9c  tor-0.2.6.9.tar.gz
6b1fbc73e108e42a57a0faba409cb5fc6b40d79897261753cc4bc076faf23c35  tor.initd
41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c  tor.confd"
sha512sums="13ba139ccc264aeaed0aff82ed4e115848ec33fa7c760edb01ce3fd4122acb8da3cb3f473834a00c3a007c08f1a4e1fb089458de23f58b94f28d937f8f3e986c  tor-0.2.6.9.tar.gz
baec0ffcbab334582aedeb2869a92862c45a379b3a71fe99b296732713ef3026adab181fccb7304bc0830f8ab72ac811b6fcbe91d739e8b78e41f515e920a0ea  tor.initd
9028ac41e3acdf4405095addb69537e87edecafaec840296ac27a5a8992fe132dc822e4e4abb8826f76460c438da2719dea17859690d03e17198a82086a3d660  tor.confd"