summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a44676f51f6268c59038300eefd620ca5c40461b (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
# Contributor: Larry Hajali <larryhaja [at] gmail [dot] com>

pkgname=ndjbdns
pkgver=1.06
pkgrel=2
pkgdesc="ndjbdns is a fork of djbdns"
arch=('i686' 'x86_64')
url="http://pjp.dgplug.org/ndjbdns/"
license=('GPL2')
depends=('systemd')
source=("http://pjp.dgplug.org/${pkgname}/${pkgname}-${pkgver}.tar.gz"
        'arch-systemd-bin-directory.patch')
sha256sums=('5ce5a7c5031f220a85fc8bca903f2d3cf484ff77e4c85e7144a0e2a5922a1127'
            '437486cdedac54600ef5152d1ccb6fedd6b8df785b6880805b1762d70287d9c7')

build()
{
  cd ${pkgname}-${pkgver}

  ### Make sure root servers file is up to date.
  _root_servers=$(curl -s http://www.internic.net/domain/named.root | grep ' A ' | awk '{print $4}')
  if [ "${_root_servers}" != "" ]; then
    echo ${_root_servers} | tr ' ' '\n' > etc/servers/dnsroots.global
  fi

  # Fix sbin directory in systemd files.
  patch -p1 < "${srcdir}"/arch-systemd-bin-directory.patch

  ./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --sysconfdir=/etc \
    --disable-silent-rules
  make
}

package()
{
  cd ${pkgname}-${pkgver}
  make install DESTDIR="${pkgdir}"
}