mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 02:22:15 +08:00
54 lines
1.3 KiB
Bash
54 lines
1.3 KiB
Bash
#
|
|
# Chakra Packages for Chakra, part of chakra-project.org
|
|
#
|
|
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
|
|
|
pkgname=kmod
|
|
pkgver=10
|
|
pkgrel=1
|
|
pkgdesc="Linux kernel module handling"
|
|
arch=('i686' 'x86_64')
|
|
url='http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary'
|
|
license=('GPL2')
|
|
depends=('glibc' 'zlib')
|
|
options=('!libtool')
|
|
provides=('module-init-tools=3.16')
|
|
conflicts=('module-init-tools')
|
|
replaces=('module-init-tools')
|
|
source=("ftp://ftp.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar.xz"
|
|
"depmod-search.conf")
|
|
md5sums=('e2a883c4df15a50f78a7a61d5b64089f'
|
|
'285fc738c220ff84419995fc8c6d6ca1')
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
./configure \
|
|
--sysconfdir=/etc \
|
|
--with-zlib
|
|
|
|
make
|
|
}
|
|
|
|
check() {
|
|
make -C "$pkgname-$pkgver" check
|
|
}
|
|
|
|
package() {
|
|
make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
|
|
|
|
# extra directories
|
|
install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d "$pkgdir/sbin"
|
|
|
|
# add symlinks to kmod
|
|
ln -s ../usr/bin/kmod "$pkgdir/sbin/modprobe"
|
|
ln -s ../usr/bin/kmod "$pkgdir/sbin/depmod"
|
|
|
|
for tool in {ins,ls,rm}mod modinfo; do
|
|
ln -s kmod "$pkgdir/usr/bin/$tool"
|
|
done
|
|
|
|
# install depmod.d file for search/ dir
|
|
install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
|
|
}
|