APKBUILD 2.79 KB
Newer Older
1 2
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
3
pkgname=dnscrypt-proxy
4
pkgver=1.9.4
5
pkgrel=0
6 7
pkgdesc="A tool for securing communications between a client and a DNS resolver"
url="http://dnscrypt.org/"
8
arch="all"
9
license="custom"
10
depends=""
11 12
depends_dev=""
makedepends="$depends_dev libsodium-dev"
13
install="$pkgname.pre-install"
14 15
pkgusers=dnscrypt
pkggroups=dnscrypt
16
subpackages="$pkgname-doc $pkgname-setup::noarch"
17
source="http://download.dnscrypt.org/$pkgname/$pkgname-$pkgver.tar.bz2
18 19
	$pkgname.initd
	$pkgname.confd
20
	$pkgname.setup
21
	"
22
builddir="$srcdir"/$pkgname-$pkgver
23

24
build() {
25
        cd "$builddir"
26 27 28 29 30 31
        CFLAGS="$CFLAGS -fPIC" ./configure \
                --build=$CBUILD \
                --host=$CHOST \
                --prefix=/usr \
                || return 1
        make || return 1
32 33 34
}

package() {
35
	cd "$builddir"
36
	make DESTDIR=$pkgdir install || return 1
37 38
	mkdir -p "$pkgdir"/var/log/$pkgname
	mkdir -p "$pkgdir"/var/run/$pkgname
39
	mkdir -p "$pkgdir"/var/empty
40 41
	mkdir -p $pkgdir/usr/share/licenses/$pkgname
        install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
42
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
43 44
	chown dnscrypt "$pkgdir"/var/log/$pkgname
	chown dnscrypt "$pkgdir"/var/run/$pkgname
45 46 47 48 49 50
	chown dnscrypt "$pkgdir"/var/empty
	install -m 644 COPYING $pkgdir/usr/share/licenses/$pkgname
}

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

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

57
md5sums="aebafce53bc91274c7b8278585734ce4  dnscrypt-proxy-1.9.4.tar.bz2
58
6ca1f01a62ca9e937851986560709a61  dnscrypt-proxy.initd
59
77b800da6d8cdf6316afacbff740b09a  dnscrypt-proxy.confd
60
5f29e17b4345d8ac9bdba26a69e3ba9a  dnscrypt-proxy.setup"
61
sha256sums="fdf4a708e7922e13b14555f315ca8d5361aec89b0595b06fdbbcaacfa4e6f11e  dnscrypt-proxy-1.9.4.tar.bz2
62
aa2b83b1944ba5f47ee5b7f2cf3cf63fbef4735753a2daf83fea3bf0ea51a7a3  dnscrypt-proxy.initd
63
36bd49d3fdada3ed8fc6abae7a8dd40a1f7a0aabf0eb1311698030b7ec710699  dnscrypt-proxy.confd
64
887c0c2d3b3d1a5326e3229ff8180351bc813f7853997e6772123beafc8bd62a  dnscrypt-proxy.setup"
65
sha512sums="6fca8983b57810d3db297eb12c24ef9cbdafc56cd580d4c80ce3ece8a6520f27e3ba5be8390c58e0c30ba8d0b06e332daa33de3df228706d229b8cb211ca92fd  dnscrypt-proxy-1.9.4.tar.bz2
66
5ad36161fc44d9c8c86a13e20d4d5fa0be81b317097bf1c092aab1e1e307021a8b6f1a92dbf2bec5fb7c534b59cf926235ea507fa6b4ccd2974ac2e3b7baa257  dnscrypt-proxy.initd
67
8cd2d40c1f465a3b26aa934fe2103650beba9504676faca3ccc9ee2b5bad940e561b3dd201d84c380bfdada72cacbe4862fc1315a4bd44fd7c56ef4f19a884f9  dnscrypt-proxy.confd
68
904965588e8e1119600413445627dc85a5efc0e32f7f3ad029921f59f214dd5c999bcd98a6622b572e528da4c5265083221fea189ed96407612842033ffcffe1  dnscrypt-proxy.setup"