kind: manual
depends:
- coreutils-common.bst
sources:
- kind: git
  url: upstream:kmod
  track: v22
  ref: 42f32b8ae45ad8e3a1da29c9b20af9b5e2e9e676
config:
  configure-commands:
  - rm -rf libkmod/docs
  - sed -i -e'/SUBDIRS/{s/\S*doc\S*//;s/\S*man\S*//}' Makefile.am
  - sed -i -e'/AC_CONFIG_FILES(\[/,/])/{/docs/d}' configure.ac
  - autoreconf -fiv
  - |
    ./configure --prefix="%{prefix}" --bindir="%{prefix}"/bin \
                --libdir="%{prefix}"/lib --sysconfdir=/etc \
                --without-xz --with-zlib \
                --disable-manpages --enable-python
  build-commands:
  - make
  install-commands:
  - make DESTDIR="%{install-root}" pkgconfigdir="%{prefix}"/lib/pkgconfig install
  post-install-commands:
  - ln -s kmod "%{install-root}/%{prefix}"/bin/modprobe
  - ln -s kmod "%{install-root}/%{prefix}"/bin/lsmod
  - ln -s kmod "%{install-root}/%{prefix}"/bin/rmmod
  - ln -s kmod "%{install-root}/%{prefix}"/bin/insmod
  - ln -s kmod "%{install-root}/%{prefix}"/bin/modinfo
  - ln -s kmod "%{install-root}/%{prefix}"/bin/depmod
