summaryrefslogtreecommitdiff
path: root/user/libnl3/APKBUILD
blob: c9a12da3a783f9f1dbe579f9de81b676e7d65a09 (plain) (blame)
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
# Maintainer: 
pkgname=libnl3
pkgver=3.5.0
_pkgver=$(printf '%s' "$pkgver" | tr . _)
pkgrel=0
pkgdesc="Library for applications dealing with netlink sockets"
url="http://www.infradead.org/~tgr/libnl/"
arch="all"
license="LGPL-2.1-only AND GPL-2.0-only"
depends=""
checkdepends="check-dev"
makedepends="linux-headers flex bison"
subpackages="$pkgname-dev $pkgname-doc $pkgname-cli"
source="https://github.com/thom311/libnl/releases/download/libnl$_pkgver/libnl-$pkgver.tar.gz"
builddir="$srcdir/libnl-$pkgver"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static \
		--enable-unit-tests
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

cli() {
	pkgdesc="Command line interface utils for libnl3"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/libnl-cli*.so.* \
		"$pkgdir"/usr/lib/libnl \
		"$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="9c94c09bac34297493b3ea482713d7c0865d2839b5042e5c7d1ed008e2402ab63df35a18e272f40b2cce27d0c31dc733fe7e4b2d376e7ca847a2b0d5e90de50c  libnl-3.5.0.tar.gz"