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

module-init-tools: clean up
author Christopher Rogers <slaxemulator@gmail.com>
date Sat May 07 05:50:34 2011 +0000 (2011-05-07)
parents 02bbaa9d12ba
children 6d21eea8cdc5
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"
rcx@3742 8 DEPENDS="glibc-base gcc-lib-base zlib lzlib depmod"
pankso@5 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@5 10 WEB_SITE="http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/"
pankso@5 11 WGET_URL="${WEB_SITE}$TARBALL"
pascal@897 12 BUILD_DEPENDS="zlib-dev lzlib-dev lzlib"
pankso@5 13
pankso@5 14 # Rules to configure and make the package.
pankso@5 15 compile_rules()
pankso@5 16 {
pankso@5 17 cd $src
pascal@3436 18 for patch_file in lzlib depmod; do
pascal@3436 19 if [ -f done.$patch_file ]; then
pascal@3436 20 echo "Skipping $patch_file"
pascal@3436 21 continue
pascal@3436 22 fi
pascal@3436 23 echo "Apply $patch_file.u"
slaxemulator@9691 24 patch -p1 < $stuff/$patch_file.u || return 1
pascal@3436 25 touch done.$patch_file
pascal@3436 26 done
gokhlayeh@7897 27
gokhlayeh@7897 28 # Don't generate manpages to avoid failure.
gokhlayeh@7897 29 echo '.so man5/modprobe.conf.5' > modprobe.d.5
gokhlayeh@7897 30
slaxemulator@9691 31 ./configure --enable-zlib \
slaxemulator@9691 32 --sbindir=/sbin --bindir=/bin --sysconfdir=/etc &&
pascal@1553 33 make &&
slaxemulator@9691 34 make install
pankso@5 35 }
pankso@5 36
pankso@5 37 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@5 38 genpkg_rules()
pankso@5 39 {
pankso@5 40 mkdir -p $fs/sbin $fs/etc
pankso@5 41 cp $_pkg/sbin/insmod $fs/sbin
pankso@5 42 cp $_pkg/sbin/modinfo $fs/sbin
pankso@5 43 cp $_pkg/sbin/modprobe $fs/sbin
pankso@5 44 cp $_pkg/sbin/rmmod $fs/sbin
pankso@5 45 # lsmod goes in /bin.
pankso@5 46 cp -a $_pkg/bin $fs
rcx@4030 47 # Create the modprobe config directory
rcx@4030 48 mkdir -p $fs/etc/modprobe.d
pankso@5 49 }
rcx@3742 50
rcx@3742 51 # Remove Busybox symlink before installing
rcx@3742 52 pre_install()
rcx@3742 53 {
rcx@3742 54 rm -f $1/sbin/insmod
rcx@3742 55 rm -f $1/sbin/modinfo
rcx@3742 56 rm -f $1/sbin/modprobe
rcx@3742 57 rm -f $1/sbin/rmmod
rcx@3742 58 # BusyBox puts lsmod in /sbin, not /bin
rcx@3742 59 rm -f $1/sbin/lsmod
rcx@3742 60 }
rcx@3742 61
rcx@3742 62 post_remove()
rcx@3742 63 {
slaxemulator@9691 64 ln -s /bin/busybox $1/sbin/insmod
slaxemulator@9691 65 ln -s /bin/busybox $1/sbin/modinfo
slaxemulator@9691 66 ln -s /bin/busybox $1/sbin/modprobe
slaxemulator@9691 67 ln -s /bin/busybox $1/sbin/rmmod
rcx@3742 68 # BusyBox puts lsmod in /sbin, not /bin
slaxemulator@9691 69 ln -s /bin/busybox $1/sbin/lsmod
rcx@3742 70 }