wok-current annotate module-init-tools/receipt @ rev 5291

Up: All Xorg proto (rel 7.5 and up)
author Christophe Lincoln <pankso@slitaz.org>
date Sun Apr 18 21:56:48 2010 +0200 (2010-04-18)
parents 71c7aacfbbb2
children c755ed365a9b
rev   line source
pankso@5 1 # SliTaz package receipt.
pankso@5 2
pankso@5 3 PACKAGE="module-init-tools"
rcx@3742 4 VERSION="3.10"
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"
pascal@3436 24 patch -p1 < ../stuff/$patch_file.u || return 1
pascal@3436 25 touch done.$patch_file
pascal@3436 26 done
pankso@5 27 ./configure --enable-zlib --prefix=/usr \
pankso@5 28 --sbindir=/sbin --bindir=/bin --sysconfdir=/etc \
pankso@5 29 --infodir=/usr/share/info --mandir=/usr/share/man \
pascal@1553 30 $CONFIGURE_ARGS &&
pascal@1553 31 make &&
pankso@5 32 make DESTDIR=$PWD/_pkg install
pankso@5 33 }
pankso@5 34
pankso@5 35 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@5 36 genpkg_rules()
pankso@5 37 {
pankso@5 38 mkdir -p $fs/sbin $fs/etc
pankso@5 39 cp $_pkg/sbin/insmod $fs/sbin
pankso@5 40 cp $_pkg/sbin/modinfo $fs/sbin
pankso@5 41 cp $_pkg/sbin/modprobe $fs/sbin
pankso@5 42 cp $_pkg/sbin/rmmod $fs/sbin
pankso@5 43 # lsmod goes in /bin.
pankso@5 44 cp -a $_pkg/bin $fs
pankso@5 45 strip -s $fs/sbin/*
pankso@5 46 strip -s $fs/bin/*
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 {
rcx@3742 64 ln -s /bin/busybox /sbin/insmod
rcx@3742 65 ln -s /bin/busybox /sbin/modinfo
rcx@3742 66 ln -s /bin/busybox /sbin/modprobe
rcx@3742 67 ln -s /bin/busybox /sbin/rmmod
rcx@3742 68 # BusyBox puts lsmod in /sbin, not /bin
rcx@3742 69 ln -s /bin/busybox /sbin/lsmod
rcx@3742 70 }