aboutsummaryrefslogtreecommitdiffstats
path: root/main/radvd/APKBUILD
blob: b8b4d84cf46f7f07652adb11417560407cb58d95 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=radvd
pkgver=1.9.1
pkgrel=0
pkgdesc="A Router Advertisement daemon"
url="http://www.litech.org/radvd/"
arch="all"
license="BSD with advertising"
depends=""
depends_dev=""
makedepends="flex bison libdaemon-dev"
install=""
subpackages="$pkgname-doc"
source="http://www.litech.org/radvd/dist/radvd-$pkgver.tar.gz
	radvd-1.1-gnu-source.patch
	radvd.initd
	radvd.confd
	"

_builddir="$srcdir"/radvd-$pkgver
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
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc/ \
		--with-pidfile=/var/run/radvd/radvd.pid \
		|| return 1
	# work around parallel build issue
	make gram.h && make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1
	mkdir -p "$pkgdir"/var/run/radvd

	install -Dm755 "$srcdir"/radvd.initd "$pkgdir"/etc/init.d/radvd \
		|| return 1
	install -Dm644 "$srcdir"/radvd.confd "$pkgdir"/etc/conf.d/radvd \
		|| return 1
}

md5sums="e807ad7e9a76d46b6133df391385cd31  radvd-1.9.1.tar.gz
c0297515f242d8e8e890d4cdc38bc5b4  radvd-1.1-gnu-source.patch
ed1e493b9cd46b705886b8934ebc988f  radvd.initd
7593b61c3198d961cc86dd5b85b9f44a  radvd.confd"