summaryrefslogtreecommitdiffstats
path: root/testing/dnscrypt-proxy/APKBUILD
blob: a8cbd7efc9dcbabd6bf8ee486d8760029d09a3bf (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: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=dnscrypt-proxy
pkgver=1.3.3
pkgrel=1
pkgdesc="A tool for securing communications between a client and a DNS resolver"
url="http://dnscrypt.org/"
arch="x86"
license="custom"
depends="libsodium"
depends_dev="libtool automake autoconf libsodium-dev"
makedepends="$depends_dev"
install="$pkgname.post-install $pkgname.pre-install"
pkgusers=dnscrypt
pkggroups=dnscrypt
subpackages="$pkgname-doc"
source="saveas-https://github.com/jedisct1/$pkgname/archive/$pkgver.tar.gz/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	$pkgname.setup
	"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
        cd "$_builddir"
	./autogen.sh
}

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

package() {
	cd "$_builddir"
	make DESTDIR=$pkgdir install || return 1
	mkdir -p "$pkgdir"/var/log/$pkgname
	mkdir -p "$pkgdir"/var/run/$pkgname
	mkdir -p $pkgdir/usr/share/licenses/$pkgname
        install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m755 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -m755 -D "$srcdir"/$pkgname.setup "$pkgdir"/sbin/setup-dnscrypt
	install -m 644 COPYING $pkgdir/usr/share/licenses/$pkgname
	chown dnscrypt "$pkgdir"/var/log/$pkgname
	chown dnscrypt "$pkgdir"/var/run/$pkgname
	rm -rf $pkgdir/usr/lib/*.la
}

md5sums="6a10b1d6018bfeed9a6dbc3b49cc39d8  dnscrypt-proxy-1.3.3.tar.gz
fc51d5d38e7f3066221300fff821d81f  dnscrypt-proxy.initd
223bc3032b229ca961bec2a3f3c44d4d  dnscrypt-proxy.confd
b24f47765020c342ba6df8c65f4f593d  dnscrypt-proxy.setup"
sha256sums="b797b1cc2ce6b7a01bc8a8d119367971f0cff20beea506cd0aeaa613fd5eaa24  dnscrypt-proxy-1.3.3.tar.gz
a56cb07b4bcedd0e9bb994f93f5f721c276ba61b576c3059a1bfad4e56c786ac  dnscrypt-proxy.initd
8291300235a79932ce753f948f850d0817f374159f28bfbbf527f8a3dcefb1c7  dnscrypt-proxy.confd
1b07365a4859ba94fa39cf1ed017744995876f75cbfc62b9865401b41723f96e  dnscrypt-proxy.setup"
sha512sums="e0d668446eaf65dce358b6d90fc7cf9905e49e267f0ff6c4d399c54b4ccc13d1c9f9622ac68f5fd992ce0b0c275b4e07bd98bc35404c822f521f20a244287dce  dnscrypt-proxy-1.3.3.tar.gz
e5516c7e1fd6baf391059407aee65a837c7324698f15a675d0368fd34de10f023fe39671e95bc951bee260254fb4e3613fde6045cdf2faf085f322b769969864  dnscrypt-proxy.initd
70be47b2954bb95341a678b3e6d68c8684e16644b8162b52c736fbac314928e1fa1d7fa9f97b4034b38d443808526fecd833b1d356df1a5e74a443e96e97d8e5  dnscrypt-proxy.confd
9161f14bee77b935fd12fa36ed60a2dd5c74c761eb75804ddb661eabc8f1cf7dd2b6506665dbc2e0f2f92540cb18e56463409c5ec5a9ceb55635bd0aba28d949  dnscrypt-proxy.setup"