wok annotate busybox-pam/receipt @ rev 2950
ecore: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri May 08 13:46:20 2009 +0200 (2009-05-08) |
parents | c5a5fdb28e98 |
children | c29319d0340a |
rev | line source |
---|---|
pascal@2195 | 1 # SliTaz package receipt. |
pascal@2195 | 2 |
pascal@2195 | 3 PACKAGE="busybox-pam" |
pascal@2195 | 4 VERSION="1.12.0" |
pascal@2195 | 5 CATEGORY="base-system" |
pascal@2195 | 6 SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities." |
pascal@2195 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@2216 | 8 DEPENDS="slitaz-base-files glibc-base pam" |
pascal@2216 | 9 BUILD_DEPENDS="bzip2 pam pam-dev" |
pascal@2195 | 10 SOURCE="busybox" |
pascal@2195 | 11 TARBALL="$SOURCE-$VERSION.tar.bz2" |
pascal@2195 | 12 WEB_SITE="http://www.busybox.net/" |
pascal@2195 | 13 WGET_URL="http://www.busybox.net/downloads/$TARBALL" |
pascal@2195 | 14 CONFIG_FILES="/etc/dnsd.conf /etc/inetd.conf /etc/udhcpd.conf /etc/resolv.conf" |
pascal@2195 | 15 PROVIDE="busybox:pam" |
pascal@2195 | 16 |
pascal@2195 | 17 # Rules to configure and make the package. |
pascal@2195 | 18 compile_rules() |
pascal@2195 | 19 { |
pascal@2195 | 20 cd $src |
pascal@2195 | 21 while read file; do |
pascal@2195 | 22 [ -f done.$file ] && continue |
pascal@2195 | 23 echo "Apply $file..." |
pascal@2195 | 24 patch -p1 < $WOK/busybox/stuff/$SOURCE-$VERSION-$file || return 1 |
pascal@2195 | 25 touch done.$file |
pascal@2195 | 26 done <<EOT |
pascal@2195 | 27 vcsa2txt.u |
pascal@2195 | 28 dhcpc.u |
pascal@2195 | 29 cpio-mkdir.u |
pascal@2195 | 30 tar.u |
pascal@2195 | 31 stat.u |
pascal@2195 | 32 zmodules.u |
pascal@2195 | 33 modinfo.u |
pascal@2195 | 34 modprobe.u |
pascal@2195 | 35 paths.u |
pascal@2574 | 36 mkswap.u |
pascal@2585 | 37 install.u |
pascal@2586 | 38 basename.u |
pascal@2195 | 39 EOT |
pascal@2195 | 40 cp $WOK/busybox/stuff/$SOURCE-$VERSION.config .config |
pascal@2195 | 41 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config |
pascal@2195 | 42 make oldconfig |
pascal@2195 | 43 make && make install |
pascal@2195 | 44 echo "Chmod 4755 on busybox binary..." |
pascal@2195 | 45 chmod 4755 _install/bin/busybox |
pascal@2195 | 46 } |
pascal@2195 | 47 |
pascal@2195 | 48 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2195 | 49 genpkg_rules() |
pascal@2195 | 50 { |
pascal@2195 | 51 cp -a $src/_install/* $fs |
pascal@2925 | 52 rm -f $fs/sbin/depmod |
pascal@2237 | 53 cp -a stuff/etc $fs |
pascal@2195 | 54 mkdir -p $fs/etc/init.d |
pascal@2195 | 55 # Busybox config files. |
pascal@2195 | 56 cd $WOK/busybox |
pascal@2196 | 57 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs |
pascal@2195 | 58 cp stuff/busybox.conf $fs/etc |
pascal@2195 | 59 chmod 600 $fs/etc/busybox.conf |
pascal@2195 | 60 cp stuff/dnsd.conf $fs/etc |
pascal@2195 | 61 cp stuff/udhcpd.conf $fs/etc |
pascal@2195 | 62 touch $fs/etc/resolv.conf |
pascal@2195 | 63 cp stuff/inetd.conf $fs/etc |
pascal@2195 | 64 cp stuff/dnsd $fs/etc/init.d |
pascal@2195 | 65 cp stuff/udhcpd $fs/etc/init.d |
pascal@2195 | 66 cp stuff/inetd $fs/etc/init.d |
pascal@2195 | 67 cp stuff/zcip $fs/etc/init.d |
pascal@2195 | 68 cp stuff/init $fs |
pascal@2195 | 69 rm $fs/linuxrc |
pascal@2195 | 70 mkdir -p $fs/etc/modprobe.d |
pascal@2195 | 71 # Udhcpc stuff. |
pascal@2195 | 72 mkdir -p $fs/usr/share/udhcpc |
pascal@2195 | 73 cp stuff/udhcp.script \ |
pascal@2195 | 74 $fs/usr/share/udhcpc/default.script |
pascal@2195 | 75 chmod +x $fs/usr/share/udhcpc/default.script |
pascal@2195 | 76 # ZeroConf stuff. |
pascal@2195 | 77 cp stuff/zcip.script $fs/etc |
pascal@2617 | 78 # .desktop stuff |
pascal@2617 | 79 mkdir -p $fs/usr/share |
pascal@2617 | 80 cp -a stuff/applications $fs/usr/share |
pascal@2195 | 81 } |
pascal@2195 | 82 |
pascal@2195 | 83 # Force glibc-2.7 reinstall if 2.3.6 still in use. |
pascal@2195 | 84 pre_install() |
pascal@2195 | 85 { |
pascal@2195 | 86 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install |
pascal@2195 | 87 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then |
pascal@2195 | 88 tazpkg get-install glibc-base --forced |
pascal@2195 | 89 fi |
pascal@2195 | 90 } |
pascal@2195 | 91 |
pascal@2195 | 92 post_install() |
pascal@2195 | 93 { |
pascal@2195 | 94 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf |
pascal@2195 | 95 } |