# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=kmod pkgver=30 pkgrel=4 pkgdesc="Linux kernel module management utilities" url="http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary" arch="all" options="!check" # https://bugs.gentoo.org/408915#c3 license="GPL-2.0-or-later" # gnu sed is needed for symlink makedepends_build="sed libxslt" makedepends_host="$depends_dev zlib-dev xz-dev zstd-dev openssl-dev>3" makedepends="$makedepends_build $makedepends_host" triggers="$pkgname.trigger=/lib/modules/*" subpackages=" $pkgname-dev $pkgname-doc $pkgname-openrc $pkgname-libs $pkgname-bash-completion " source="https://kernel.org/pub/linux/utils/kernel/kmod/kmod-$pkgver.tar.xz strndupa.patch kmod-static-nodes.initd " build() { if [ -z "$BOOTSTRAP" ]; then export CFLAGS="$CFLAGS -flto=auto" fi ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --bindir=/bin \ --sysconfdir=/etc \ --with-rootlibdir=/lib \ --with-zlib \ --with-xz \ --with-zstd \ --with-openssl make } package() { make DESTDIR="$pkgdir" install local i mkdir -p "$pkgdir"/sbin for i in lsmod rmmod insmod modinfo modprobe depmod; do ln -sf ../bin/kmod "$pkgdir"/sbin/$i done for i in lsmod modinfo; do ln -s kmod "$pkgdir"/bin/$i done install -Dm755 "$srcdir"/kmod-static-nodes.initd \ "$pkgdir"/etc/init.d/kmod-static-nodes } libs() { license="LGPL-2.1-or-later" default_libs } sha512sums=" e2cd34e600a72e44710760dfda9364b790b8352a99eafbd43e683e4a06f37e6b5c0b5d14e7c28070e30fc5fc6ceddedf7b97f3b6c2c5c2d91204fefd630b9a3e kmod-30.tar.xz f2ea3527bfba182c5e15557c224a5bba8c7e2ea3d21cf604e6eb2277226dcf983c3aeb9ac44a322c7f2b4942b35135da999d63a5b946b829d3f3b09c050a0f17 strndupa.patch 7f0f89fe98167f71b7924f341ba701d001158225463c2f5e39f706a0224b1e952ee901b441f28cb15787563e83bb6e54eb752bf8669ae7c0ffbb11984542f354 kmod-static-nodes.initd "