diff options
author | Oleksandr Natalenko | 2015-12-12 00:58:13 +0200 |
---|---|---|
committer | Oleksandr Natalenko | 2015-12-12 00:59:06 +0200 |
commit | f1fb8d8c9895f12e3425afbfd1c488a66e9fc4db (patch) | |
tree | 9f908aa210d6c029a649a87123fb8a4ff2a5569c | |
download | aur-f1fb8d8c9895f12e3425afbfd1c488a66e9fc4db.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | dnsbalancer.service | 15 |
4 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1d09f0790f42 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +# Generated by mksrcinfo v8 +# Fri Dec 11 22:58:55 UTC 2015 +pkgbase = dnsbalancer + pkgdesc = Daemon to balance UDP DNS requests over DNS servers + pkgver = 0.0.1 + pkgrel = 1 + url = https://github.com/LanetNetwork/dnsbalancer + arch = x86_64 + license = GPL + makedepends = git + makedepends = gcc + makedepends = cmake + makedepends = make + depends = iniparser + depends = libmicrohttpd + depends = libbsd + depends = ldns + optdepends = gperftools: faster memory allocation with tcmalloc + source = dnsbalancer-git::git+https://github.com/LanetNetwork/dnsbalancer.git + source = dnsbalancer.service + sha256sums = SKIP + sha256sums = 0ba09709bdadcdbab31e29dabd11b126bac549b31773c4f44693226622a9f723 + +pkgname = dnsbalancer + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..23a220a2c294 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +dnsbalancer-git/ +*.tar.xz +pkg +src diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..f07fbeb2c192 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Oleksandr Natalenko <oleksandr@natalenko.name> +pkgname=dnsbalancer +pkgver=0.0.1 +pkgrel=1 +pkgdesc="Daemon to balance UDP DNS requests over DNS servers" +arch=('x86_64') +url="https://github.com/LanetNetwork/${pkgname}" +license=('GPL') +depends=('iniparser' 'libmicrohttpd' 'libbsd' 'ldns') +optdepends=('gperftools: faster memory allocation with tcmalloc') +makedepends=('git' 'gcc' 'cmake' 'make') + +source=( + "${pkgname}-git::git+https://github.com/LanetNetwork/${pkgname}.git" + "dnsbalancer.service" + ) + +sha256sums=( + "SKIP" + "0ba09709bdadcdbab31e29dabd11b126bac549b31773c4f44693226622a9f723" + ) + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + git submodule update --init --recursive + + mkdir -p build + cd build + + cmake -DCMAKE_BUILD_TYPE=Release -DDB_INIPARSER4=1 -DCMAKE_INSTALL_PREFIX=${pkgdir}/usr .. + make -j$(nproc) +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}/build" + make install + install -Dm0644 ../${pkgname}.conf.sample ${pkgdir}/etc/${pkgname}/${pkgname}.conf.sample + install -Dm0644 ../../${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service +} + diff --git a/dnsbalancer.service b/dnsbalancer.service new file mode 100644 index 000000000000..1f1c1be14f42 --- /dev/null +++ b/dnsbalancer.service @@ -0,0 +1,15 @@ +[Unit] +Description=UDP DNS balancer +After=network.target + +[Service] +Type=forking +PrivateTmp=true +PIDFile=/run/dnsbalancer.pid +Nice=-1 +ExecStart=/usr/bin/dnsbalancer --config=/etc/dnsbalancer/dnsbalancer.conf --pid-file=/run/dnsbalancer.pid --daemonize --syslog +Restart=always + +[Install] +WantedBy=multi-user.target + |