summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 78ece7da18432f9f9f6d3c4a1eb006e6f1f210cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Maintainer: Remi Gacogne <rgacogne-arch at archlinux dot org>
pkgname=powerdns-recursor-git
pkgver=5.0.0alpha1.r2.g1116ade49
pkgrel=1
pkgdesc='Resolving DNS server'
arch=('x86_64')
url='https://www.powerdns.com/'
license=('GPL2')
source=("${pkgname}::git+https://github.com/PowerDNS/pdns"
        sysusers.conf)
sha512sums=('SKIP'
            '63b3f0664d38fbbcb6b1c914cee050a27eca0a15550962973743580dd5d3ace2e68272ca2d856d53cc74001fe9246d61207ebbc74524c096736777ed08c88e72')
makedepends=('boost' 'git' 'pandoc' 'python-virtualenv' 'ragel' 'rust' 'systemd' 'lld')
depends=('boost-libs' 'fstrm' 'libboost_context.so' 'libcurl.so' 'libsodium' 'systemd-libs' 'luajit' 'net-snmp' 'openssl')
provides=('powerdns-recursor')
conflicts=('powerdns-recursor')
backup=('etc/powerdns/recursor.conf')
options=(!lto)

prepare() {
  cd "${pkgname}/pdns/recursordist"
  autoreconf -i
}

pkgver() {
  cd "${pkgname}"
  git describe --tags --match 'rec-*' | sed 's/rec-//;s/.\(\(rc\|alpha\|beta\)\d*\)/\1/;s/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${pkgname}/pdns/recursordist"
  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --sysconfdir=/etc/powerdns \
    --disable-silent-rules \
    --enable-reproducible \
    --enable-systemd \
    --enable-dns-over-tls \
    --with-libsodium \
    --with-lua=luajit \
    --with-net-snmp \
    --enable-auto-var-init=zero \
    --with-service-user=pdns-recursor \
    --with-service-group=pdns-recursor
  make
}

package() {
  cd "${pkgname}/pdns/recursordist/"
  make DESTDIR="${pkgdir}" install
  mv "${pkgdir}/etc/powerdns/recursor.conf-dist" "${pkgdir}/etc/powerdns/recursor.conf"
  install -Dm 644 "${srcdir}/sysusers.conf" "${pkgdir}/usr/lib/sysusers.d/powerdns-recursor.conf"
}

# vim: ts=2 sw=2 et: