wok annotate module-init-tools/receipt @ rev 24347

Up expat (2.4.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 02 09:41:22 2022 +0000 (2022-02-02)
parents 9e01bc6321ea
children
rev   line source
pankso@5 1 # SliTaz package receipt.
pankso@5 2
pankso@5 3 PACKAGE="module-init-tools"
gokhlayeh@7897 4 VERSION="3.12"
pankso@178 5 CATEGORY="base-system"
pankso@5 6 SHORT_DESC="Kernel modules manipulation tools."
pankso@289 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15000 8 LICENSE="GPL2"
pankso@5 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@17923 10 WEB_SITE="https://www.kernel.org/pub/linux/utils/kernel/module-init-tools/"
pankso@5 11 WGET_URL="${WEB_SITE}$TARBALL"
pascal@15000 12
pascal@15000 13 DEPENDS="glibc-base gcc-lib-base zlib lzlib depmod"
pascal@17923 14 BUILD_DEPENDS="wget zlib-dev lzlib-dev lzlib"
pankso@5 15
pascal@24336 16 # What is the latest version available today?
pascal@24336 17 current_version()
pascal@24336 18 {
pascal@24336 19 wget -O - ${WGET_URL%/*} 2>/dev/null | \
pascal@24336 20 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
pascal@24336 21 }
pascal@24336 22
pankso@5 23 # Rules to configure and make the package.
pankso@5 24 compile_rules()
pankso@5 25 {
pascal@3436 26 for patch_file in lzlib depmod; do
pascal@3436 27 if [ -f done.$patch_file ]; then
pascal@3436 28 echo "Skipping $patch_file"
pascal@3436 29 continue
pascal@3436 30 fi
pascal@3436 31 echo "Apply $patch_file.u"
slaxemulator@9691 32 patch -p1 < $stuff/$patch_file.u || return 1
pascal@3436 33 touch done.$patch_file
pascal@3436 34 done
gokhlayeh@7897 35
gokhlayeh@7897 36 # Don't generate manpages to avoid failure.
gokhlayeh@7897 37 echo '.so man5/modprobe.conf.5' > modprobe.d.5
gokhlayeh@7897 38
slaxemulator@9691 39 ./configure --enable-zlib \
slaxemulator@10139 40 --sbindir=/sbin --bindir=/bin --sysconfdir=/etc \
slaxemulator@10139 41 $CONFIGURE_ARGS &&
slaxemulator@10139 42 make && make install
pankso@5 43 }
pankso@5 44
pankso@5 45 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@5 46 genpkg_rules()
pankso@5 47 {
pankso@5 48 mkdir -p $fs/sbin $fs/etc
pascal@15000 49 cp $install/sbin/insmod $fs/sbin
pascal@15000 50 cp $install/sbin/modinfo $fs/sbin
pascal@15000 51 cp $install/sbin/modprobe $fs/sbin
pascal@15000 52 cp $install/sbin/rmmod $fs/sbin
pankso@5 53 # lsmod goes in /bin.
pascal@15000 54 cp -a $install/bin $fs
rcx@4030 55 # Create the modprobe config directory
rcx@4030 56 mkdir -p $fs/etc/modprobe.d
pankso@5 57 }
rcx@3742 58
rcx@3742 59 # Remove Busybox symlink before installing
rcx@3742 60 pre_install()
rcx@3742 61 {
pascal@18730 62 rm -f "$1/sbin/insmod"
pascal@18730 63 rm -f "$1/sbin/modinfo"
pascal@18730 64 rm -f "$1/sbin/modprobe"
pascal@18730 65 rm -f "$1/sbin/rmmod"
rcx@3742 66 # BusyBox puts lsmod in /sbin, not /bin
pascal@18730 67 rm -f "$1/sbin/lsmod"
rcx@3742 68 }
rcx@3742 69
rcx@3742 70 post_remove()
rcx@3742 71 {
pascal@18730 72 ln -s /bin/busybox "$1/sbin/insmod"
pascal@18730 73 ln -s /bin/busybox "$1/sbin/modinfo"
pascal@18730 74 ln -s /bin/busybox "$1/sbin/modprobe"
pascal@18730 75 ln -s /bin/busybox "$1/sbin/rmmod"
rcx@3742 76 # BusyBox puts lsmod in /sbin, not /bin
pascal@18730 77 ln -s /bin/busybox "$1/sbin/lsmod"
rcx@3742 78 }