From 5ea16ad124ca2ca04bd6a5308c35f6aea3302316 Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Sat, 7 Sep 2024 23:18:11 +0800 Subject: [PATCH] kmod 33-1 --- kmod/PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 kmod/PKGBUILD diff --git a/kmod/PKGBUILD b/kmod/PKGBUILD new file mode 100644 index 0000000..cc2054c --- /dev/null +++ b/kmod/PKGBUILD @@ -0,0 +1,43 @@ +# This is an example PKGBUILD file. Use this as a start to creating your own, +# and remove these comments. For more information, see 'man PKGBUILD'. +# NOTE: Please fill out the license field for your package! If it is unknown, +# then please put 'unknown'. + +# Maintainer: Future Linux Team +pkgname=kmod +pkgver=33 +pkgrel=1 +pkgdesc="Linux kernel module management tools and library" +arch=('x86_64') +url="https://github.com/kmod-project/kmod" +license=('LGPL-2.1-or-later' 'GPL-2.0-or-later') +depends=('glibc' 'zlib' 'openssl' 'xz' 'zstd') +options=('strip') +source=(https://www.kernel.org/pub/linux/utils/kernel/${pkgname}/${pkgname}-${pkgver}.tar.xz) +sha256sums=(dc768b3155172091f56dc69430b5481f2d76ecd9ccb54ead8c2540dbcf5ea9bc) + +build() { + cd ${pkgname}-${pkgver} + + ${CONFIGURE} \ + --sysconfdir=/etc \ + --with-openssl \ + --with-xz \ + --with-zstd \ + --with-zlib \ + --disable-manpages + + make +} + +package() { + cd ${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install + + install -vdm755 ${pkgdir}/usr/sbin + for target in depmod insmod modinfo modprobe rmmod lsmod; do + ln -sfv /usr/bin/kmod ${pkgdir}/usr/sbin/${target} + rm -fv ${pkgdir}/usr/bin/$target + done +}