102.11.0-1
[arch-packages.git] / dnsmasq / trunk / PKGBUILD
blobccc75bedd8b685076057dc5b68e4cefb3d18b3e3
1 # Maintainer: Christian Hesse <mail@eworm.de>
2 # Maintainer: Dave Reisner <dreisner@archlinux.org>
3 # Contributor: Paul Mattal <paul@archlinux.org>
4 # Contributor: Tom Newsom <Jeepster@gmx.co.uk>
6 pkgname=dnsmasq
7 pkgver=2.89
8 pkgrel=1
9 pkgdesc='Lightweight, easy to configure DNS forwarder and DHCP server'
10 url='http://www.thekelleys.org.uk/dnsmasq/doc.html'
11 arch=('x86_64')
12 license=('GPL')
13 depends=('glibc' 'gmp' 'libidn2' 'libidn2.so' 'libdbus' 'libdbus-1.so' 'nftables'
14          'libnetfilter_conntrack' 'nettle' 'libnettle.so' 'libhogweed.so')
15 backup=('etc/dnsmasq.conf')
16 validpgpkeys=('D6EACBD6EE46B834248D111215CDDA6AE19135A2') # Simon Kelley <simon@thekelleys.org.uk>
17 source=("http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.xz"{,.asc}
18         'dnsmasq-sysusers.conf'
19         'dnsmasq.service')
20 sha256sums=('02bd230346cf0b9d5909f5e151df168b2707103785eb616b56685855adebb609'
21             'SKIP'
22             '7f6ff6a709038ae580758f4b6a754451d7f7ce22957b88a36b97f7b643d3c2ab'
23             '297dbae8cfa3d353284820dd87cc65c37d1ef289cac3a5c3ede079413d31eeec')
25 _build_copts='-DHAVE_DNSSEC -DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_CONNTRACK -DHAVE_NFTSET'
27 build() {
28   cd "$pkgname-$pkgver"
30   make \
31     CFLAGS="$CPPFLAGS $CFLAGS" \
32     LDFLAGS="$LDFLAGS" \
33     COPTS="$_build_copts" \
34     PREFIX=/usr \
35     BINDIR=/usr/bin \
36     all-i18n
38   cd "contrib/lease-tools"
40   make \
41     CFLAGS="$CPPFLAGS $CFLAGS" \
42     LDFLAGS="$LDFLAGS" \
43     COPTS="$_build_copts" \
44     all
47 package() {
48   cd "$pkgname-$pkgver"
50   # need to pass COPTS here to avoid rebuilding the binary.
51   make \
52     COPTS="$_build_copts" \
53     PREFIX=/usr \
54     BINDIR=/usr/bin \
55     DESTDIR="$pkgdir" \
56     install-i18n
58   install -Dm0644 "dbus/dnsmasq.conf" "$pkgdir"/usr/share/dbus-1/system.d/dnsmasq.conf
59   install -Dm0644 "dnsmasq.conf.example" "$pkgdir"/etc/dnsmasq.conf
60   install -Dm0644 "$srcdir/dnsmasq.service" "$pkgdir"/usr/lib/systemd/system/dnsmasq.service
61   install -Dm0644 "$srcdir/dnsmasq-sysusers.conf" "$pkgdir"/usr/lib/sysusers.d/dnsmasq.conf
63   # DNSSEC setup
64   sed -i 's,%%PREFIX%%,/usr,' "$pkgdir"/etc/dnsmasq.conf
65   install -Dm0644 "trust-anchors.conf" "$pkgdir"/usr/share/dnsmasq/trust-anchors.conf
67   install -Dm0755 -t "$pkgdir"/usr/bin/ 'contrib/lease-tools/dhcp_'{release{,6},lease_time}
68   install -Dm0644 -t "$pkgdir"/usr/share/man/man1 'contrib/lease-tools/dhcp_'{release{,6},lease_time}.1
71 # vim: ts=2 sw=2 et ft=sh