wok-4.x view module-init-tools/receipt @ rev 7897
Up: module-init-tools 1.12
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Sun Jan 09 14:07:48 2011 +0100 (2011-01-09) |
parents | c755ed365a9b |
children | 02bbaa9d12ba |
line source
1 # SliTaz package receipt.
3 PACKAGE="module-init-tools"
4 VERSION="3.12"
5 CATEGORY="base-system"
6 SHORT_DESC="Kernel modules manipulation tools."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="glibc-base gcc-lib-base zlib lzlib depmod"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://ftp.kernel.org/pub/linux/utils/kernel/module-init-tools/"
11 WGET_URL="${WEB_SITE}$TARBALL"
12 BUILD_DEPENDS="zlib-dev lzlib-dev lzlib"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 for patch_file in lzlib depmod; do
19 if [ -f done.$patch_file ]; then
20 echo "Skipping $patch_file"
21 continue
22 fi
23 echo "Apply $patch_file.u"
24 patch -p1 < ../stuff/$patch_file.u || return 1
25 touch done.$patch_file
26 done
28 # Don't generate manpages to avoid failure.
29 echo '.so man5/modprobe.conf.5' > modprobe.d.5
31 ./configure --enable-zlib --prefix=/usr \
32 --sbindir=/sbin --bindir=/bin --sysconfdir=/etc \
33 --infodir=/usr/share/info --mandir=/usr/share/man \
34 $CONFIGURE_ARGS &&
35 make &&
36 make DESTDIR=$PWD/_pkg install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/sbin $fs/etc
43 cp $_pkg/sbin/insmod $fs/sbin
44 cp $_pkg/sbin/modinfo $fs/sbin
45 cp $_pkg/sbin/modprobe $fs/sbin
46 cp $_pkg/sbin/rmmod $fs/sbin
47 # lsmod goes in /bin.
48 cp -a $_pkg/bin $fs
49 strip -s $fs/sbin/*
50 strip -s $fs/bin/*
51 # Create the modprobe config directory
52 mkdir -p $fs/etc/modprobe.d
53 }
55 # Remove Busybox symlink before installing
56 pre_install()
57 {
58 rm -f $1/sbin/insmod
59 rm -f $1/sbin/modinfo
60 rm -f $1/sbin/modprobe
61 rm -f $1/sbin/rmmod
62 # BusyBox puts lsmod in /sbin, not /bin
63 rm -f $1/sbin/lsmod
64 }
66 post_remove()
67 {
68 ln -s /bin/busybox /sbin/insmod
69 ln -s /bin/busybox /sbin/modinfo
70 ln -s /bin/busybox /sbin/modprobe
71 ln -s /bin/busybox /sbin/rmmod
72 # BusyBox puts lsmod in /sbin, not /bin
73 ln -s /bin/busybox /sbin/lsmod
74 }