aboutsummaryrefslogtreecommitdiffstats
path: root/main/dnsmasq/APKBUILD
blob: 5db137406322a7f3bdd05b655bd115a1ac04f99f (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dnsmasq
pkgver=2.76
pkgrel=2
pkgdesc="A lightweight DNS, DHCP, RA, TFTP and PXE server"
url="http://www.thekelleys.org.uk/dnsmasq/"
arch="all"
license="GPL2"
depends=""
makedepends="linux-headers"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-doc"
source="http://www.thekelleys.org.uk/dnsmasq/$pkgname-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	uncomment-conf-dir.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	make PREFIX=/usr CFLAGS="$CFLAGS" all || return 1
}

# dnsmasq doesn't provide any test suite (shame on them!), so just check that
# the binary isn't totally broken...
check() {
	cd "$builddir"
	./src/dnsmasq --help >/dev/null
}

package() {
	cd "$builddir"

	make PREFIX=/usr DESTDIR="$pkgdir" install || return 1

	install -D -m755 "$srcdir"/$pkgname.initd \
		"$pkgdir"/etc/init.d/$pkgname || return 1

	install -D -m644 "$srcdir"/$pkgname.confd \
		"$pkgdir"/etc/conf.d/$pkgname || return 1

	install -m644 dnsmasq.conf.example "$pkgdir"/etc/dnsmasq.conf || return 1
	install -d -m755 "$pkgdir"/etc/dnsmasq.d || return 1

	install -D -m644 trust-anchors.conf \
		"$pkgdir"/usr/share/$pkgname/trust-anchors.conf
}

md5sums="6610f8233ca89b15a1bb47c788ffb84f  dnsmasq-2.76.tar.gz
f8ac1192164af3dfbc06499f53aa4831  dnsmasq.initd
16985abb08c8e11f85e38b37ea3863a4  dnsmasq.confd
9a224e79a0be715bee519af93da0a81a  uncomment-conf-dir.patch"
sha256sums="777c4762d2fee3738a0380401f2d087b47faa41db2317c60660d69ad10a76c32  dnsmasq-2.76.tar.gz
deeea140ea362d330fd509755556f3e1322f37b3dbe91f01003c4d1772220264  dnsmasq.initd
51c0672a70d5d6793d295d82db666d372fb081e8627318f67c88e48d08d254b5  dnsmasq.confd
c1ec96b6001c5873992eb612a560995b2a8be441fe23ce6bc52119c651b2943c  uncomment-conf-dir.patch"
sha512sums="c22627a8d864671096d3b3428ec4f879b513e1f1e7f79be3ab89444c56234e748fbfa6b6b4f9e521984fea95d363f4aa2ca6243f0dfc12ffb74bed0648ae21c5  dnsmasq-2.76.tar.gz
6927ba31be547f02720093c9bbf3c3c978a71882849c7ed779d0239cc7629ca7ea5ed55acd7ef104f2853677ee9c746b6fa2b28bff03430bf8d5cef103b29b96  dnsmasq.initd
9a401bfc408bf1638645c61b8ca734bea0a09ef79fb36648ec7ef21666257234254bbe6c73c82cc23aa1779ddcdda0e6baa2c041866f16dfb9c4e0ba9133eab8  dnsmasq.confd
d01077f39e1240041a6700137810f254daf683b2d58dafecb6b162e94d694992e57d45964a57993b298f97c2b589eedcf9fb1506692730a38b7f06b5f55ba8d8  uncomment-conf-dir.patch"