# Contributor: Francesco Colista # Maintainer: Francesco Colista pkgname=dnscrypt-proxy pkgver=1.4.2 pkgrel=1 pkgdesc="A tool for securing communications between a client and a DNS resolver" url="http://dnscrypt.org/" arch="all" license="custom" depends="" depends_dev="libsodium-dev" makedepends="$depends_dev" install="$pkgname.pre-install" pkgusers=dnscrypt pkggroups=dnscrypt subpackages="$pkgname-doc $pkgname-setup" source="http://download.dnscrypt.org/$pkgname/$pkgname-$pkgver.tar.bz2 $pkgname.initd $pkgname.confd $pkgname.setup " _builddir="$srcdir"/$pkgname-$pkgver 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 $pkgname" mkdir -p "$subpkgdir"/sbin install -m755 -D "$srcdir"/$pkgname.setup "$subpkgdir"/sbin/setup-dnscrypt } md5sums="9f077f9b5929e00f107474270314f7cc dnscrypt-proxy-1.4.2.tar.bz2 fc51d5d38e7f3066221300fff821d81f dnscrypt-proxy.initd 77b800da6d8cdf6316afacbff740b09a dnscrypt-proxy.confd db3d5b2ed76479f2882415820ae4af53 dnscrypt-proxy.setup" sha256sums="766bcd8874cd6cbfeeeb7246c75c39ddc14317ad81ad713bd6cfc9529b2f0c0d dnscrypt-proxy-1.4.2.tar.bz2 a56cb07b4bcedd0e9bb994f93f5f721c276ba61b576c3059a1bfad4e56c786ac dnscrypt-proxy.initd 36bd49d3fdada3ed8fc6abae7a8dd40a1f7a0aabf0eb1311698030b7ec710699 dnscrypt-proxy.confd 9ebd58c38cbae86485e4660a31ea0d839c4120be010b9124d0d80cb5ae4dc561 dnscrypt-proxy.setup" sha512sums="1b934b05c043009aeb24de9fdc0e518fc9b59bbabfc59fd308dc92cbf25cdf52f6162def0c7f5fab3aeb935a7eb3e8e059ee4091763e558880fa025602392524 dnscrypt-proxy-1.4.2.tar.bz2 e5516c7e1fd6baf391059407aee65a837c7324698f15a675d0368fd34de10f023fe39671e95bc951bee260254fb4e3613fde6045cdf2faf085f322b769969864 dnscrypt-proxy.initd 8cd2d40c1f465a3b26aa934fe2103650beba9504676faca3ccc9ee2b5bad940e561b3dd201d84c380bfdada72cacbe4862fc1315a4bd44fd7c56ef4f19a884f9 dnscrypt-proxy.confd 3c1a0fe8883d4e2f383703369e3e58f98b1376ce9bdb7d8263e0f1f9b10e6bcf4674d1f6b1c1f5380a33be0831660512a64e60af532e9d394f4792934fc96aba dnscrypt-proxy.setup"