aboutsummaryrefslogtreecommitdiffstats
path: root/testing/yadifa/APKBUILD
blob: d9991be1305aff1fa2887519bd8b079a6df233a5 (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
72
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=yadifa
pkgver=2.0.0
_buildnr=4192
pkgrel=3
pkgdesc="Lightweight authoritative Name Server with DNSSEC capabilities"
url="http://www.yadifa.eu"
arch="all"
license="BSD-3"
depends="openssl"
depends_dev="openssl-dev"
makedepends="$depends_dev"
install="$pkgname.post-install"
options="libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="http://cdn.yadifa.eu/sites/default/files/releases/$pkgname-$pkgver-$_buildnr.tgz
	poll-h.patch
	$pkgname.initd
	$pkgname.confd"

_builddir="$srcdir"/$pkgname-$pkgver-$_buildnr
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/tcp_io_stream.c
	sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/debug.c
	sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/format.c
	sed -i -e "s/__linux__/__GLIBC__/g" sbin/yadifad/signals.c
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--build=$CBUILD \
		--host=$CHOST \
		--sysconfdir=/etc/$pkgname \
		--localstatedir=/var/yadifa \
		--enable-dynamic-provisioning \
		--enable-rrl
	make
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	install -D -m 0755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -D -m 0755 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
	install -D -m 0755 etc/*.example "$pkgdir"/etc/$pkgname
	cp etc/yadifad.conf "$pkgdir"/etc/$pkgname
	mkdir -p  "$pkgdir"/var/run/$pkgname
	mkdir -p  "$pkgdir"/var/log/$pkgname
	rm -f "$pkgdir"/usr/lib/*.la
}

md5sums="8bb0cd24c3bea7ea7f503ca523b8a13b  yadifa-2.0.0-4192.tgz
bb9b9e01e8781949381bc1d6e24076ea  poll-h.patch
1579f429de215d40bceaef797a022dad  yadifa.initd
5440992593d8605cf9c638d0e59d7fc5  yadifa.confd"
sha256sums="ef98afcfa544474c6634a3177af402fc37453dd3244c084bc9e4b323997ef61c  yadifa-2.0.0-4192.tgz
250910b256cf0193ffa74fdae3a22d6cfc6834bd6f751ad9dcf331c43d5a6c0a  poll-h.patch
ec8c6505831d3c021a5557521f5bc4c02ddfccaf2adb6e1bda0b56efe4e48a7f  yadifa.initd
09ae43cadd2790cec47a904ded91dfad989b91108d1d6f0221ea171676c3de22  yadifa.confd"
sha512sums="a476ab13d25763bd5c53e140243eb6b1524c31ea6b6361196fd68d08d07683b009d9b76c579149815a9d7e887edc6e1edef90436330b37cad301ab3249728aba  yadifa-2.0.0-4192.tgz
a72c0a296de2a0a8ab4b6836cbf364be0c2b2854d1f7c2a151d015902b55b0766c61466a18f4e904e82e40776ba88b8ce0b61f218799ad9d8d779f63aa9610d6  poll-h.patch
c4b581b2408e0bd86ae5439ecc8ec7edc3bb5e906b9949aaf2a78bbdfdeedb46907522a5b96ad83d5758e98368169a6d52305f259fdbad1da780ce8c30056ec5  yadifa.initd
eac74148b58d3b7472602542622616bd0ef441b191356a5b7fd06d17284c579139c1fde9b35fbb30a8214394863e31bed4c8521aff7b3f7ea831f14c2a3ccf01  yadifa.confd"