APKBUILD 1.43 KB
Newer Older
Natanael Copa's avatar
Natanael Copa committed
1 2
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libnl3
Natanael Copa's avatar
Natanael Copa committed
3 4
pkgver=3.4.0
pkgrel=0
Natanael Copa's avatar
Natanael Copa committed
5
pkgdesc="Library for applications dealing with netlink sockets"
Natanael Copa's avatar
Natanael Copa committed
6
url="http://www.infradead.org/~tgr/libnl/"
Natanael Copa's avatar
Natanael Copa committed
7 8 9
arch="all"
license="GPL"
depends=
Natanael Copa's avatar
Natanael Copa committed
10
makedepends="linux-headers flex bison libtool autoconf automake"
11
checkdepends="check-dev"
12
subpackages="$pkgname-dev $pkgname-doc $pkgname-cli"
Natanael Copa's avatar
Natanael Copa committed
13 14 15
source="https://github.com/thom311/libnl/releases/download/libnl${pkgver//./_}/libnl-$pkgver.tar.gz
	libnl3-musl.patch
	"
Natanael Copa's avatar
Natanael Copa committed
16

Sören Tempel's avatar
Sören Tempel committed
17
builddir="$srcdir"/libnl-$pkgver
18
prepare () {
19
	default_prepare
Sören Tempel's avatar
Sören Tempel committed
20
	cd "$builddir"
21
	autoreconf -vif
Natanael Copa's avatar
Natanael Copa committed
22 23
}

24
build () {
Sören Tempel's avatar
Sören Tempel committed
25
	cd "$builddir"
26 27 28 29
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
Sören Tempel's avatar
Sören Tempel committed
30 31 32
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
Natanael Copa's avatar
Natanael Copa committed
33
		--disable-static \
34 35 36 37 38 39 40
		--enable-unit-tests
	make
}

check() {
	cd "$builddir"
	make check
Natanael Copa's avatar
Natanael Copa committed
41 42 43
}

package() {
Sören Tempel's avatar
Sören Tempel committed
44
	cd "$builddir"
45
	make DESTDIR="$pkgdir" install
Natanael Copa's avatar
Natanael Copa committed
46 47
}

Natanael Copa's avatar
Natanael Copa committed
48 49 50
cli() {
	pkgdesc="Command line interface utils for libnl3"
	mkdir -p "$subpkgdir"/usr/lib/
Natanael Copa's avatar
Natanael Copa committed
51 52
	mv "$pkgdir"/usr/lib/libnl-cli*.so.* \
		"$pkgdir"/usr/lib/libnl \
53 54
		"$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
Natanael Copa's avatar
Natanael Copa committed
55 56
}

Natanael Copa's avatar
Natanael Copa committed
57 58
sha512sums="6336e5c55c79ff2638de9c812cc1842871769236bad7f65c547dec35fafd91988b257fceab144a0cc133c4b29f61172f6552c53aa9fc723bdc783079c2b1851e  libnl-3.4.0.tar.gz
a31ec4b76d2fc472072f2d770cb3f5819a6477230a97603a476ce175c0c94d25e74eff8dc0ce2e6baa96f0e450b82db508a152f418bdd72919cbd5521d5f82fd  libnl3-musl.patch"