wok-6.x annotate module-init-tools/receipt @ rev 17609
Up: gpick (0.2.5)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Feb 12 18:16:49 2015 +0200 (2015-02-12) |
parents | 6d21eea8cdc5 |
children | 36278632a653 |
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" |
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@15000 | 12 |
pascal@15000 | 13 DEPENDS="glibc-base gcc-lib-base zlib lzlib depmod" |
pascal@897 | 14 BUILD_DEPENDS="zlib-dev lzlib-dev lzlib" |
pankso@5 | 15 |
pankso@5 | 16 # Rules to configure and make the package. |
pankso@5 | 17 compile_rules() |
pankso@5 | 18 { |
pankso@5 | 19 cd $src |
pascal@3436 | 20 for patch_file in lzlib depmod; do |
pascal@3436 | 21 if [ -f done.$patch_file ]; then |
pascal@3436 | 22 echo "Skipping $patch_file" |
pascal@3436 | 23 continue |
pascal@3436 | 24 fi |
pascal@3436 | 25 echo "Apply $patch_file.u" |
slaxemulator@9691 | 26 patch -p1 < $stuff/$patch_file.u || return 1 |
pascal@3436 | 27 touch done.$patch_file |
pascal@3436 | 28 done |
gokhlayeh@7897 | 29 |
gokhlayeh@7897 | 30 # Don't generate manpages to avoid failure. |
gokhlayeh@7897 | 31 echo '.so man5/modprobe.conf.5' > modprobe.d.5 |
gokhlayeh@7897 | 32 |
slaxemulator@9691 | 33 ./configure --enable-zlib \ |
slaxemulator@10139 | 34 --sbindir=/sbin --bindir=/bin --sysconfdir=/etc \ |
slaxemulator@10139 | 35 $CONFIGURE_ARGS && |
slaxemulator@10139 | 36 make && make 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 |
pascal@15000 | 43 cp $install/sbin/insmod $fs/sbin |
pascal@15000 | 44 cp $install/sbin/modinfo $fs/sbin |
pascal@15000 | 45 cp $install/sbin/modprobe $fs/sbin |
pascal@15000 | 46 cp $install/sbin/rmmod $fs/sbin |
pankso@5 | 47 # lsmod goes in /bin. |
pascal@15000 | 48 cp -a $install/bin $fs |
rcx@4030 | 49 # Create the modprobe config directory |
rcx@4030 | 50 mkdir -p $fs/etc/modprobe.d |
pankso@5 | 51 } |
rcx@3742 | 52 |
rcx@3742 | 53 # Remove Busybox symlink before installing |
rcx@3742 | 54 pre_install() |
rcx@3742 | 55 { |
rcx@3742 | 56 rm -f $1/sbin/insmod |
rcx@3742 | 57 rm -f $1/sbin/modinfo |
rcx@3742 | 58 rm -f $1/sbin/modprobe |
rcx@3742 | 59 rm -f $1/sbin/rmmod |
rcx@3742 | 60 # BusyBox puts lsmod in /sbin, not /bin |
rcx@3742 | 61 rm -f $1/sbin/lsmod |
rcx@3742 | 62 } |
rcx@3742 | 63 |
rcx@3742 | 64 post_remove() |
rcx@3742 | 65 { |
slaxemulator@9691 | 66 ln -s /bin/busybox $1/sbin/insmod |
slaxemulator@9691 | 67 ln -s /bin/busybox $1/sbin/modinfo |
slaxemulator@9691 | 68 ln -s /bin/busybox $1/sbin/modprobe |
slaxemulator@9691 | 69 ln -s /bin/busybox $1/sbin/rmmod |
rcx@3742 | 70 # BusyBox puts lsmod in /sbin, not /bin |
slaxemulator@9691 | 71 ln -s /bin/busybox $1/sbin/lsmod |
rcx@3742 | 72 } |