diff options
Diffstat (limited to 'testing/dnscrypt-proxy')
-rw-r--r-- | testing/dnscrypt-proxy/APKBUILD | 55 | ||||
-rw-r--r-- | testing/dnscrypt-proxy/dnscrypt-proxy.confd | 7 | ||||
-rw-r--r-- | testing/dnscrypt-proxy/dnscrypt-proxy.initd | 19 | ||||
-rw-r--r-- | testing/dnscrypt-proxy/dnscrypt-proxy.pre-install | 3 |
4 files changed, 84 insertions, 0 deletions
diff --git a/testing/dnscrypt-proxy/APKBUILD b/testing/dnscrypt-proxy/APKBUILD new file mode 100644 index 000000000..3311b5409 --- /dev/null +++ b/testing/dnscrypt-proxy/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Francesco Colista <francesco.colista@gmail.com> +# Maintainer: Francesco Colista <francesco.colista@gmail.com> +pkgname=dnscrypt-proxy +pkgver=1.3.0 +pkgrel=0 +pkgdesc="A tool for securing communications between a client and a DNS resolver" +url="http://dnscrypt.org/" +arch="all" +license="custom" +depends="" +depends_dev="" +makedepends="$depends_dev" +install="" +pkguser=dnscrypt +pkggroup=dnscrypt +subpackages="$pkgname-dev $pkgname-doc" +source="http://download.dnscrypt.org/$pkgname/$pkgname-$pkgver.tar.bz2 + $pkgname.initd + $pkgname.confd + " +_builddir="$srcdir"/$pkgname-$pkgver + +build() { + + cd "$_builddir"/src/libsodium + make -j1 check + + cd "$_builddir" + CFLAGS="$CFLAGS -fPIC" ./configure --prefix=/usr + make -j1 +} + +package() { + cd "$_builddir" + make DESTDIR=$pkgdir install + 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 -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="33cc94dd06d23f96b4bac3efd1b20c95 dnscrypt-proxy-1.3.0.tar.bz2 +9d4858771258a029d00197422d3888b8 dnscrypt-proxy.initd +a7a34c94174eca5c688e7867a87cafb3 dnscrypt-proxy.confd" +sha256sums="211ee2d75acd631b09d012229c73654c2302234d73c9f12425e1c906520dc7c5 dnscrypt-proxy-1.3.0.tar.bz2 +f8b9301a8deda8413c6057788644505e622c0e12c8637f1dc7bdddf44f9cbec7 dnscrypt-proxy.initd +e4817f9c73137bf34607df3617f3fa3075ea8cb805cff948e06901ca7259e46b dnscrypt-proxy.confd" +sha512sums="b6d7e6796d24bfe8ef27a16c4e6970122965f4d9fd4f3df997fc4f46e2c762efcd6fd145df7e154c2b66b358771d1ce45f676df3810b14fb6aeec0b182e354b6 dnscrypt-proxy-1.3.0.tar.bz2 +34e375faab52b381198bf50d1ce5e47be56132e7e427255782747952cf828951fec4676b523558f3f0bb46c1afa1a58b46960a3d9c550f6196f8de182a03e220 dnscrypt-proxy.initd +544133669bb1ef1ab17992035919afccb911f7f282b71f0369f055a105efe7f6b9d61c1f281f879d684f08a095559800f57e124982dd4ea33b90a12b61352009 dnscrypt-proxy.confd" diff --git a/testing/dnscrypt-proxy/dnscrypt-proxy.confd b/testing/dnscrypt-proxy/dnscrypt-proxy.confd new file mode 100644 index 000000000..9b6828636 --- /dev/null +++ b/testing/dnscrypt-proxy/dnscrypt-proxy.confd @@ -0,0 +1,7 @@ +DNSCRYPT_LOGFILE=/var/log/dnscrypt-proxy/dnscrypt-proxy.log +RUNDIR=/var/run/dnscrypt-proxy +PID=/var/run/dnscrypt-proxy/dnscrypt-proxy.pid +DNSCRYPT_USER=dnscrypt +DNSCRYPT_GROUP=dnscrypt +# Set here the IP where DNSCRYPT listen +DNSCRYPT_LOCALIP=127.0.0.1:53 diff --git a/testing/dnscrypt-proxy/dnscrypt-proxy.initd b/testing/dnscrypt-proxy/dnscrypt-proxy.initd new file mode 100644 index 000000000..ff63b6f41 --- /dev/null +++ b/testing/dnscrypt-proxy/dnscrypt-proxy.initd @@ -0,0 +1,19 @@ +#!/sbin/runscript + +depend() { + use net + before dns + after logger +} + +start() { + ebegin "Starting dnscrypt-proxy" + start-stop-daemon --start --quiet --pidfile=${PID} --exec /usr/sbin/dnscrypt-proxy -- -p ${PID} -l ${DNSCRYPT_LOGFILE} -d -u ${DNSCRYPT_GROUP} -a ${DNSCRYPT_LOCALIP} + eend $? +} + +stop() { + ebegin "Stopping dnscrypt-proxy" + start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy + eend $? +} diff --git a/testing/dnscrypt-proxy/dnscrypt-proxy.pre-install b/testing/dnscrypt-proxy/dnscrypt-proxy.pre-install new file mode 100644 index 000000000..300ea6b37 --- /dev/null +++ b/testing/dnscrypt-proxy/dnscrypt-proxy.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh +adduser -H -h /var/empty -g dnscrypt -D -s /bin/false dnscrypt 2>/dev/null +exit 0 |