aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dnscrypt-proxy/APKBUILD
blob: 8dae2b2d4f2446214b32f77286313f511ec79cb4 (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
67
68
69
70
71
72
73
74
75
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=dnscrypt-proxy
pkgver=1.4.0
pkgrel=1
pkgdesc="A tool for securing communications between a client and a DNS resolver"
url="http://dnscrypt.org/"
arch="all"
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 $pkgname-setup"
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"/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
	rm -rf $pkgdir/usr/lib/*.la
	install -m 644 COPYING $pkgdir/usr/share/licenses/$pkgname
}

setup() {
	arch="noarch"
	pkgdesc="Script for setting up DNSCrypt Proxy"
	depends="sed wget"
	mkdir -p "$subpkgdir"/sbin
	install -m755 -D "$srcdir"/$pkgname.setup "$subpkgdir"/sbin/setup-dnscrypt
}

md5sums="64b5f5ababbcf72d6c32c57a092785c5  dnscrypt-proxy-1.4.0.tar.gz
fc51d5d38e7f3066221300fff821d81f  dnscrypt-proxy.initd
223bc3032b229ca961bec2a3f3c44d4d  dnscrypt-proxy.confd
4b1c9ffcd06dee8ac1cdd7832e463c95  dnscrypt-proxy.setup"
sha256sums="d750d4b0f100ea454a50194062230f7a12db5df897fb4a528d3585ce277dc3d9  dnscrypt-proxy-1.4.0.tar.gz
a56cb07b4bcedd0e9bb994f93f5f721c276ba61b576c3059a1bfad4e56c786ac  dnscrypt-proxy.initd
8291300235a79932ce753f948f850d0817f374159f28bfbbf527f8a3dcefb1c7  dnscrypt-proxy.confd
06c79b5add8f9adc1d59823326dbc053239596a910032a78dbdd516fb1272621  dnscrypt-proxy.setup"
sha512sums="a9542797f27bc4ac7b39ae4d7fcba3f7a6f83ebe1a66feeadca5c1e240047276577aed8271463af33c131102b634f7a19af90a66dbb59be03bb993a1bdae2a4e  dnscrypt-proxy-1.4.0.tar.gz
e5516c7e1fd6baf391059407aee65a837c7324698f15a675d0368fd34de10f023fe39671e95bc951bee260254fb4e3613fde6045cdf2faf085f322b769969864  dnscrypt-proxy.initd
70be47b2954bb95341a678b3e6d68c8684e16644b8162b52c736fbac314928e1fa1d7fa9f97b4034b38d443808526fecd833b1d356df1a5e74a443e96e97d8e5  dnscrypt-proxy.confd
e4b395ed374d98f888ff84f350631b953257719058b2a5cf9701ad719a3e178ce36cb414ae40de4d0729fe83362953d8277a7c54ce320b49b238549216452304  dnscrypt-proxy.setup"