aboutsummaryrefslogtreecommitdiffstats
path: root/main/kmod/APKBUILD
blob: bc5da41fc828c5eead02089981eb3458777ac429 (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
54
55
56
57
58
59
60
61
62
63
64
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=kmod
pkgver=18
pkgrel=0
pkgdesc="Linux kernel module management utilities"
url="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary"
arch="all"
license="GPL2+"
depends=""
depends_dev=""
makedepends="$depends_dev zlib-dev xz-dev libxslt tar"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="http://ftp.kernel.org/pub/linux/utils/kernel/kmod/kmod-$pkgver.tar.xz
	strndupa.patch"

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

build() {
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--bindir=/bin \
		--with-rootlibdir=/lib \
		--with-zlib \
		--with-xz \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
	local i
	mkdir -p "$pkgdir"/sbin
	for i in lsmod rmmod insmod modinfo modprobe depmod; do
		ln -sf ../bin/kmod "$pkgdir"/sbin/$i || return 1
	done
	rm -f "$pkgdir"/usr/lib/*.la
}

libs() {
	pkgdesc="Libraries to handle kernel module loading and unloading"
	mkdir -p "$subpkgdir"/
	mv "$pkgdir"/lib "$subpkgdir"/
}

md5sums="82835c7f01983634e06ca72b4ee30cc6  kmod-18.tar.xz
350ef5291e72a563f3452309ba8f56d5  strndupa.patch"
sha256sums="e16e57272b54acb219c465b334715cfdddb5d97ff5d8948d4830ca1a372a868e  kmod-18.tar.xz
f0f0156b3a02b1fefb346c972d276866349ee13e52237e195cb058e2971dfa77  strndupa.patch"
sha512sums="6704f52f1b69837f06516237fb61d3f29551b06e59f270561993e0318c104bdc0140a32d3fc9bda859d0918412ea2c40effa0ceeccbda5e1cb79a204d7219847  kmod-18.tar.xz
0a4f407cad324bb9e210845cb35db607f064e2030484e8a4bee8802ed8f813040e23e2d36891904d64bdcf9bd5ba82b37dd382a6a1fb7bddc987a006de5c40f6  strndupa.patch"