102 lines
3.2 KiB
Bash
102 lines
3.2 KiB
Bash
#!/usr/bin/bash
|
|
# JOBoRun : Jwm OpenBox Obarun RUNit
|
|
# Maintainer : Joe Bo Run <joborun@disroot.org>
|
|
# PkgSource : url="https://git.disroot.org/joborun-pkg/jobcore/src/branch/main/$pkgname"
|
|
# Website : https://pozol.eu
|
|
#-----------------------------------------| DESCRIPTION |---------------------------------------
|
|
|
|
pkgname=kmod
|
|
pkgver=33
|
|
pkgrel=03
|
|
pkgdesc="Linux kernel module management tools and library"
|
|
url='https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git'
|
|
depends=('glibc' 'zlib' 'openssl' 'xz')
|
|
makedepends=('git' 'scdoc')
|
|
checkdepends=('linux-headers' 'libelf')
|
|
#options=('strip' 'debug')
|
|
options=(strip)
|
|
provides=('libkmod.so')
|
|
#source=("https://www.kernel.org/pub/linux/utils/kernel/$pkgname/$pkgname-$pkgver.tar."{xz,sign}
|
|
# '0001-test-user-path.patch'
|
|
source=("git+https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git#tag=v${pkgver}?signed"
|
|
'depmod-search.conf'
|
|
'depmod.hook'
|
|
'depmod.script')
|
|
|
|
prepare() {
|
|
cd $pkgname
|
|
touch libkmod/docs/gtk-doc.make
|
|
autoreconf --force --install --symlink
|
|
|
|
}
|
|
|
|
build() {
|
|
cd $pkgname
|
|
|
|
./configure \
|
|
--sysconfdir=/etc \
|
|
--with-xz \
|
|
--with-zlib \
|
|
--without-zstd \
|
|
--with-openssl
|
|
|
|
make
|
|
}
|
|
|
|
check() {
|
|
# As of kmod v20, the test suite needs to build some kernel modules, and thus
|
|
# needs headers available in order to run. We depend on linux-headers, but
|
|
# this is really only to try and make sure that *some* useable tree of kernel
|
|
# headers exist. The first useable tree we find is good enough, as these
|
|
# modules will never be loaded by tests.
|
|
|
|
local kdirs=(/usr/lib/modules/*/build/Makefile)
|
|
if [[ ! -f ${kdirs[0]} ]]; then
|
|
printf '==> Unable to find kernel headers to build modules for tests\n' >&2
|
|
return 1
|
|
fi
|
|
|
|
local kver kdir=${kdirs[0]%/Makefile}
|
|
IFS=/ read _ _ _ kver _ <<<"$kdir"
|
|
|
|
make -C "$pkgname" check KDIR="$kdir" KVER="$kver"
|
|
}
|
|
|
|
package() {
|
|
make -C "$pkgname" DESTDIR="$pkgdir" install
|
|
|
|
# extra directories
|
|
install -dm755 "$pkgdir"/{etc,usr/lib}/{depmod,modprobe}.d
|
|
|
|
# for tool in {ins,ls,rm,dep}mod mod{probe,info}; do
|
|
# ln -s kmod "$pkgdir/usr/bin/$tool"
|
|
# done
|
|
|
|
# install depmod.d file for search/ dir
|
|
install -Dm0644 "$srcdir/depmod-search.conf" "$pkgdir/usr/lib/depmod.d/search.conf"
|
|
|
|
# hook
|
|
install -Dm0644 "$srcdir/depmod.hook" "$pkgdir/usr/share/libalpm/hooks/60-depmod.hook"
|
|
install -Dm0755 "$srcdir/depmod.script" "$pkgdir/usr/share/libalpm/scripts/depmod"
|
|
}
|
|
|
|
#---- arch license gpg-key & sha256sums ----
|
|
|
|
arch=(x86_64)
|
|
|
|
license=('LGPL-2.1-or-later' 'GPL-2.0-or-later')
|
|
|
|
validpgpkeys=('EAB33C9690013C733916AC839BA2A5A630CBEA53') # Lucas DeMarchi
|
|
|
|
md5sums=('621c84906429cdf0b8b7f6826f142c8d'
|
|
'dd62cbf62bd8f212f51ef8c43bec9a77'
|
|
'e179ace75721e92b04b2e145b69dab29'
|
|
'3aae9a88a6b41827d73d2dea4642a58a') # depmod.script
|
|
|
|
sha256sums=(f5795fe50a747609d70f764244e645cd946074e70a7e51de0f82bd2e4d0612c8 # kmod 33
|
|
1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8 # depmod-search.conf
|
|
c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1 # depmod.hook
|
|
18661aa40c25580f04d2ac3f32e54c2997c0994d1c829905537b413a9d291ac6) # depmod.script
|
|
|
|
## 9083fd4b12713ace67dd1b5969cedca2c8bea7c7bf1c2a1261464c6d4395a1a0 kmod-33-03-x86_64.pkg.tar.lz
|
|
|