aboutsummaryrefslogtreecommitdiffstats
path: root/community/dnscrypt-proxy/APKBUILD
blob: 42acb33ff891ff74c5c13b1672efe5345da5d66e (plain) (blame)
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: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=dnscrypt-proxy
pkgver=1.9.5
pkgrel=0
pkgdesc="A tool for securing communications between a client and a DNS resolver"
url="http://dnscrypt.org/"
arch="all"
license="custom"
makedepends="$depends_dev libsodium-dev"
install="$pkgname.pre-install"
pkgusers=dnscrypt
pkggroups=dnscrypt
subpackages="$pkgname-doc $pkgname-setup::noarch"
source="http://download.dnscrypt.org/$pkgname/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname.setup
	"
builddir="$srcdir"/$pkgname-$pkgver

check() {
	cd "$builddir"
	make check
}

build() {
	cd "$builddir"
	CFLAGS="$CFLAGS -fPIC" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr 
	make
}

package() {
	cd "$builddir"
	make DESTDIR=$pkgdir install || return 1
	mkdir -p "$pkgdir"/var/log/$pkgname
	mkdir -p "$pkgdir"/var/run/$pkgname
	mkdir -p "$pkgdir"/var/empty
	mkdir -p $pkgdir/usr/share/licenses/$pkgname
        install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	chown dnscrypt "$pkgdir"/var/log/$pkgname
	chown dnscrypt "$pkgdir"/var/run/$pkgname
	chown dnscrypt "$pkgdir"/var/empty
	install -m 644 COPYING $pkgdir/usr/share/licenses/$pkgname
}

setup() {
	pkgdesc="Script for setting up DNSCrypt Proxy"
	depends="sed wget $pkgname"

	mkdir -p "$subpkgdir"/sbin
	install -m755 -D "$srcdir"/$pkgname.setup "$subpkgdir"/sbin/setup-dnscrypt
}

sha512sums="af5abcd08e3a51c1c8e142647946773c7afb4ba5076f95e74a5cbf7c54a62082de98014b6c9a1349ec6938f90d4f3584b6e6caa136902345922e16e7c9689132  dnscrypt-proxy-1.9.5.tar.gz
5ad36161fc44d9c8c86a13e20d4d5fa0be81b317097bf1c092aab1e1e307021a8b6f1a92dbf2bec5fb7c534b59cf926235ea507fa6b4ccd2974ac2e3b7baa257  dnscrypt-proxy.initd
8cd2d40c1f465a3b26aa934fe2103650beba9504676faca3ccc9ee2b5bad940e561b3dd201d84c380bfdada72cacbe4862fc1315a4bd44fd7c56ef4f19a884f9  dnscrypt-proxy.confd
904965588e8e1119600413445627dc85a5efc0e32f7f3ad029921f59f214dd5c999bcd98a6622b572e528da4c5265083221fea189ed96407612842033ffcffe1  dnscrypt-proxy.setup"