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 depmod.hook depmod.script depmod-search.conf) sha256sums=(dc768b3155172091f56dc69430b5481f2d76ecd9ccb54ead8c2540dbcf5ea9bc c11c2a0f66ea405493e8617689ca10818dc81dd1dddc19bdb220c8b2917119c1 46613dc62c8cc70904b8baa2c1ba76290a72f797b4363ab8683f211fb7d4ef5b 1a92bfeae870f61ce814577e69d2a147a9c0caf6aed1131243e4179241fcc4a8) build() { cd ${pkgname}-${pkgver} local configure_args=( --sysconfdir=/etc --with-openssl --with-xz --with-zstd --with-zlib --disable-manpages ${configure_options} ) ./configure ${configure_args[@]} make } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} install install -vdm0755 ${pkgdir}/{etc,usr/lib}/{depmod,modprobe}.d install -vDm644 ${srcdir}/depmod-search.conf ${pkgdir}/usr/lib/depmod.d/search.conf install -vDm644 ${srcdir}/depmod.hook ${pkgdir}/usr/share/libalpm/hooks/60-depmod.hook install -vDm755 ${srcdir}/depmod.script ${pkgdir}/usr/share/libalpm/scripts/depmod 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 }