# Contributor: Ɓukasz Jendrysik # Contributor: Matt Smith # Contributor: Olivier Mauras # Contributor: Daniel Isaksen # Contributor: Fabian Zoske # Maintainer: Matt Smith pkgname=pdns pkgver=4.1.6 pkgrel=0 pkgdesc="PowerDNS Authoritative Server" url="https://www.powerdns.com/" arch="all" license="GPL-2.0-or-later" depends="" depends_dev="" makedepends="$depends_dev boost-dev curl geoip-dev krb5-dev openssl-dev libsodium-dev lua-dev mariadb-connector-c-dev openldap-dev postgresql-dev protobuf-dev sqlite-dev unixodbc-dev yaml-cpp-dev" install="$pkgname.pre-install" subpackages="$pkgname-doc $pkgname-openrc $pkgname-tools $pkgname-backend-bind:backend_bind $pkgname-backend-geoip:backend_geoip $pkgname-backend-ldap:backend_ldap $pkgname-backend-lua:backend_lua $pkgname-backend-mariadb:backend_mariadb:noarch $pkgname-backend-mydns:backend_mydns $pkgname-backend-mysql:backend_mysql $pkgname-backend-odbc:backend_odbc $pkgname-backend-pipe:backend_pipe $pkgname-backend-pgsql:backend_pgsql $pkgname-backend-random:backend_random $pkgname-backend-remote:backend_remote $pkgname-backend-sqlite3:backend_sqlite3" pkgusers="pdns" pkggroups="pdns" source="https://downloads.powerdns.com/releases/$pkgname-$pkgver.tar.bz2 $pkgname.initd $pkgname.conf" builddir="$srcdir/$pkgname-$pkgver" # secfixes: # 4.1.5-r0: # - CVE-2018-10851 # - CVE-2018-14626 # 4.0.5-r0: # - CVE-2017-15091 build() { cd "$builddir" ./configure --prefix=/usr \ --sysconfdir="/etc/$pkgname" \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --libdir="/usr/lib/$pkgname" \ --with-modules="" \ --with-dynmodules="bind geoip ldap lua mydns gmysql godbc pipe gpgsql random remote gsqlite3" \ --enable-tools \ --enable-unit-tests \ --disable-static make } check() { cd "$builddir" PDNS_TEST_NO_IPV6=1 make check } package() { cd "$builddir" make DESTDIR="$pkgdir" install install -m755 -D "$srcdir/$pkgname.initd" \ "$pkgdir/etc/init.d/$pkgname" rm "$pkgdir/etc/$pkgname/$pkgname.conf-dist" install -m600 -D "$srcdir/$pkgname.conf" \ "$pkgdir/etc/$pkgname/$pkgname.conf" chown pdns:pdns "$pkgdir/etc/$pkgname/$pkgname.conf" } tools() { _tool_names="zone2ldap zone2sql zone2json dnsgram dnsreplay dnsscan dnsscope dnswasher dumresp pdns_notify nproxy nsec3dig saxfr stubquery ixplore sdig calidns dnsbulktest dnstcpbench dnspcap2protobuf" mkdir -p "$subpkgdir" cd "$subpkgdir" mkdir -p "$subpkgdir/usr/bin" for _tool in $_tool_names; do mv "$pkgdir/usr/bin/$_tool" "$subpkgdir/usr/bin/" done; unset -v _tool } _backend() { local backend=$1 shift pkgdesc="$backend backend module for PowerDNS" depends="$pkgname $*" mkdir -p "$subpkgdir" } _mv_backend() { local backend=$1 _backend "$@" mkdir -p "$subpkgdir/usr/lib/pdns/pdns" mv "$pkgdir/usr/lib/pdns/pdns/lib${backend}backend.so" \ "$subpkgdir/usr/lib/pdns/pdns/" } backend_bind() { _mv_backend bind; } backend_geoip() { _mv_backend geoip geoip; } backend_ldap() { _mv_backend ldap; } backend_lua() { _mv_backend lua lua; } backend_mariadb() { _backend mariadb $pkgname-backend-mysql; } backend_mydns() { _mv_backend mydns; } backend_mysql() { _mv_backend gmysql mariadb-client; } backend_odbc() { _mv_backend godbc unixodbc; } #backend_opendbx() { _mv_backend opendbx; } #backend_oracle() { _mv_backend goracle; } backend_pipe() { _mv_backend pipe; } backend_pgsql() { _mv_backend gpgsql postgresql-client; } backend_random() { _mv_backend random; } backend_remote() { _mv_backend remote; } backend_sqlite3() { _mv_backend gsqlite3 sqlite; } #backend_tinydns() { _mv_backend tinydns; } sha512sums="094e532ff50aeb54c8b3e46e3b4a77d1fb2c9d3d0fccce6ccb71b3825f5e53f53af680625ea4e98b5dbc29fbd210bc3b4a47c7f05b4b3ac2cf7537369a7e15b2 pdns-4.1.6.tar.bz2 3a55547e1b6407e7d2faa6e02982ed903c2364381af1b7eeb626ae3a8b0e32558dd79bf31c982b134414e5636d4868c1f3660ac523f25d2440ed6f7b436843bf pdns.initd 3f809f3257680c3e496fa6a4c86c8a636db5d9d5b92aef96fe54c29b8266ee590deb792d13205cc171e27307fa73295dd3b101b09102fd66a2393a7cdbf9dd27 pdns.conf"