aboutsummaryrefslogtreecommitdiffstats
path: root/community/yadifa/APKBUILD
blob: e16a16fdfa0b412a0c5ad42e13c287c8bbfbecc6 (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
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=yadifa
pkgver=2.2.6
_buildnr=7246
pkgrel=1
pkgdesc="Lightweight authoritative Name Server with DNSSEC capabilities"
url="http://www.yadifa.eu"
arch="all"
license="BSD-3"
makedepends="libressl-dev"
install="$pkgname.post-install"
options="!libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="http://cdn.yadifa.eu/sites/default/files/releases/$pkgname-$pkgver-$_buildnr.tar.gz
	libressl-compat.patch
	$pkgname.initd
	$pkgname.confd"

builddir="$srcdir"/$pkgname-$pkgver-$_buildnr

check() {
	cd "$builddir"
	make check
}

prepare() {
	cd "$builddir"
	sed -i -e "s/__linux__/__GLIBC__/g" lib/dnscore/src/debug.c
	sed -i -e "s/__linux__/__GLIBC__/g" sbin/yadifad/signals.c
	default_prepare
}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--build=$CBUILD \
		--host=$CHOST \
		--sysconfdir=/etc/$pkgname \
		--localstatedir=/var/yadifa \
		--enable-dynamic-provisioning \
		--enable-ctrl \
		--enable-non-aa-axfr-support \
		--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
}

sha512sums="e6bf54caa69174fd6df6c7f84e11f63071ac0cadb7469fe23a5da0f03845993c76e79caa6f264974a7175f31f641135a6f088ca5f8ad608fa0de65c1e114a62b  yadifa-2.2.6-7246.tar.gz
6d25115d91ca23928b2e96b6e9e18522442996e482bedc888a6e5f59ae4d276b32a521a0c990e7220064b26af772d7f986a479847f9b395cb79030b2cb31bcce  libressl-compat.patch
a3a65bf13f41838d9493facc2903d955aafd107a29d8a73d4ed021690e1e2c511f48915360a9490ccbf8d9573f8e9c3fca988cb6dd5e57546787384e2b2d075d  yadifa.initd
eac74148b58d3b7472602542622616bd0ef441b191356a5b7fd06d17284c579139c1fde9b35fbb30a8214394863e31bed4c8521aff7b3f7ea831f14c2a3ccf01  yadifa.confd"