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

Fixed freeciv.
author Christopher Rogers <slaxemulator@gmail.com>
date Fri Feb 18 06:06:38 2011 +0000 (2011-02-18)
parents c755ed365a9b
children 02bbaa9d12ba
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"
pascal@3436 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
pankso@5 31 ./configure --enable-zlib --prefix=/usr \
pankso@5 32 --sbindir=/sbin --bindir=/bin --sysconfdir=/etc \
pankso@5 33 --infodir=/usr/share/info --mandir=/usr/share/man \
pascal@1553 34 $CONFIGURE_ARGS &&
pascal@1553 35 make &&
pankso@5 36 make DESTDIR=$PWD/_pkg install
pankso@5 37 }
pankso@5 38
pankso@5 39 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@5 40 genpkg_rules()
pankso@5 41 {
pankso@5 42 mkdir -p $fs/sbin $fs/etc
pankso@5 43 cp $_pkg/sbin/insmod $fs/sbin
pankso@5 44 cp $_pkg/sbin/modinfo $fs/sbin
pankso@5 45 cp $_pkg/sbin/modprobe $fs/sbin
pankso@5 46 cp $_pkg/sbin/rmmod $fs/sbin
pankso@5 47 # lsmod goes in /bin.
pankso@5 48 cp -a $_pkg/bin $fs
pankso@5 49 strip -s $fs/sbin/*
pankso@5 50 strip -s $fs/bin/*
rcx@4030 51 # Create the modprobe config directory
rcx@4030 52 mkdir -p $fs/etc/modprobe.d
pankso@5 53 }
rcx@3742 54
rcx@3742 55 # Remove Busybox symlink before installing
rcx@3742 56 pre_install()
rcx@3742 57 {
rcx@3742 58 rm -f $1/sbin/insmod
rcx@3742 59 rm -f $1/sbin/modinfo
rcx@3742 60 rm -f $1/sbin/modprobe
rcx@3742 61 rm -f $1/sbin/rmmod
rcx@3742 62 # BusyBox puts lsmod in /sbin, not /bin
rcx@3742 63 rm -f $1/sbin/lsmod
rcx@3742 64 }
rcx@3742 65
rcx@3742 66 post_remove()
rcx@3742 67 {
rcx@3742 68 ln -s /bin/busybox /sbin/insmod
rcx@3742 69 ln -s /bin/busybox /sbin/modinfo
rcx@3742 70 ln -s /bin/busybox /sbin/modprobe
rcx@3742 71 ln -s /bin/busybox /sbin/rmmod
rcx@3742 72 # BusyBox puts lsmod in /sbin, not /bin
rcx@3742 73 ln -s /bin/busybox /sbin/lsmod
rcx@3742 74 }