aboutsummaryrefslogtreecommitdiffstats
path: root/main/libnl3/APKBUILD
blob: cb0faa8f0b7ab7af3d82206733ba3ad8835a5c5b (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.26
pkgrel=2
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="c8de31b74b1c15267b5ac2927b11125c  libnl-3.2.26.tar.gz"
sha256sums="1323ff6cea47efe9f988893b09840942a8c36131f472a9f3b96eb68d8f8d7555  libnl-3.2.26.tar.gz"
sha512sums="5ab4a3a40244d71e0c8c50fcef30a67f814509d508e9537c85f2d710578a8a61513e7f26b2c0c29a9817484ca6ecd005e53b4f9054cd878274ae3b439abbe516  libnl-3.2.26.tar.gz"