aboutsummaryrefslogtreecommitdiffstats
path: root/main/open-lldp/APKBUILD
blob: ef1e73f0394f6a4bb606fdc7679a484eeb1f8186 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=open-lldp
_realname=lldpad
pkgver=0.9.45
pkgrel=1
pkgdesc="Open Source implementation of the IEEE standard 802.1AB Link Layer Discovery Protocol (LLDP)"
url="http://www.open-lldp.org"
arch="all"
license="GPL"
depends=
makedepends="autoconf automake bash flex libtool libconfig-dev libnl-dev
	readline-dev"
install=
subpackages="$pkgname-dev $pkgname-doc"
source="http://dev.alpinelinux.org/archive/open-lldp/lldpad-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd"

_builddir="$srcdir/lldpad-$pkgver"

prepare() {
	cd "$_builddir"
	sed -i 's/ln -T -s/ln -s/' Makefile.am || exit 1
	#sed -i 's/ln -T -s/ln -s/' Makefile.in || exit 1
	sed -i -e 's/-Werror//' Makefile.am configure.ac || exit 1
	libtoolize --force && aclocal && autoconf --force && automake --add-missing
}

build() {
	cd "$_builddir"
	./bootstrap.sh || return 1
	# aclocal -W all && automake -W all && autoconf -W all
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info || return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install
	mkdir -p "$pkgdir"/usr/include/dcbd
	# ln -s /usr/include/lldpad "$pkgdir"/usr/include/dcbd
	ln -s /usr/include/lldpad/lldp_dcbx_cmds.h "$pkgdir"/usr/include/dcbd/clif_cmds.h
	install -m755 -D ../../$pkgname.initd "$pkgdir"/etc/init.d/$_realname
	install -m644 -D ../../$pkgname.confd "$pkgdir"/etc/conf.d/$_realname
	find "$pkgdir" -name *.la -delete
}

md5sums="b06621c730a5e6f575755b061676ac5e  lldpad-0.9.45.tar.gz
4d226f4520fec36afee8e6b6eebf46f1  open-lldp.initd
a1d2e351028d39193fc0a3466ba4db33  open-lldp.confd"