aboutsummaryrefslogtreecommitdiffstats
path: root/main/libnl3/APKBUILD
blob: 25cac29cf9adc4473e20761338b760f5450be5e9 (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: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnl3
pkgver=3.2.27
pkgrel=0
pkgdesc="Library for applications dealing with netlink sockets"
url="http://www.infradead.org/~tgr/libnl/"
arch="all"
license="GPL"
depends=
makedepends="linux-headers flex bison libtool autoconf automake"
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

prepare () {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -s -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	autoreconf -vif
}

build () {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--disable-static \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

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/ || return 1
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/  || return 1
}

md5sums="cec19f941b79a38d9eb92dbc171d6dbd  libnl-3.2.27.tar.gz"
sha256sums="4bbbf92b3c78a90f423cf96260bf419a28b75db8cced47051217a56795f58ec6  libnl-3.2.27.tar.gz"
sha512sums="f66d1c42eef75f6a1008abd6850f00abb0290d49bb685b4df43464c4dbf57d68fd4551f2a77bb2f375fd0a342b73cfd54d17c791f01ea43ce02683c8703e3a33  libnl-3.2.27.tar.gz"