blob: 80f9825830697522b18daa59bd5bf7668159e971 (
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=dnsmasq-git
pkgver=2.86test4.r18.g96f6444
pkgrel=1
pkgdesc="Lightweight, easy to configure DNS forwarder and DHCP server"
arch=('i686' 'x86_64')
url="http://www.thekelleys.org.uk/dnsmasq/doc.html"
license=('GPL')
depends=('glibc' 'gmp' 'libidn2' 'libdbus' 'libnetfilter_conntrack' 'nettle')
makedepends=('git')
provides=('dnsmasq')
conflicts=('dnsmasq')
source=("git://thekelleys.org.uk/dnsmasq.git"
"dnsmasq-sysusers.conf::https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/dnsmasq/trunk/dnsmasq-sysusers.conf"
"dnsmasq.service::https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/dnsmasq/trunk/dnsmasq.service")
sha256sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
cd "dnsmasq"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
_build_copts="-DHAVE_DBUS -DHAVE_LIBIDN2 -DHAVE_CONNTRACK -DHAVE_DNSSEC"
build() {
cd "dnsmasq"
make \
CFLAGS="$CPPFLAGS $CFLAGS" \
LDFLAGS="$LDFLAGS" \
COPTS="$_build_copts" \
all-i18n
cd "contrib/lease-tools"
make \
CFLAGS="$CPPFLAGS $CFLAGS" \
LDFLAGS="$LDFLAGS" \
COPTS="$_build_copts" \
all
}
package() {
cd "dnsmasq"
make \
COPTS="$_build_copts" \
DESTDIR="$pkgdir" \
PREFIX="/usr" \
BINDIR="/usr/bin" \
install \
install-i18n
install -Dm644 "dnsmasq.conf.example" "$pkgdir/etc/dnsmasq.conf"
install -Dm644 "dbus/dnsmasq.conf" -t "$pkgdir/usr/share/dbus-1/system.d"
install -Dm644 "$srcdir/dnsmasq.service" -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 "$srcdir/dnsmasq-sysusers.conf" "$pkgdir/usr/lib/sysusers.d/dnsmasq.conf"
# DNSSEC setup
sed -i 's,%%PREFIX%%,/usr,' "$pkgdir/etc/dnsmasq.conf"
install -Dm644 "trust-anchors.conf" -t "$pkgdir/usr/share/dnsmasq"
install -Dm755 "contrib/lease-tools"/dhcp_{release{,6},lease_time} -t "$pkgdir/usr/bin"
install -Dm644 "contrib/lease-tools"/dhcp_{release{,6},lease_time}.1 -t "$pkgdir/usr/share/man/man1"
}
|