wok-stable annotate busybox-pam/receipt @ rev 5103

hal:update build_deps; hal-extra: add some removed fdi files
author Rohit Joshi <jozee@slitaz.org>
date Tue Mar 16 17:21:07 2010 +0000 (2010-03-16)
parents 02779417eb2b
children 2a5e098a34ac
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@3635 24 patch -p1 < $WOK/$SOURCE/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@3319 39 unlzma.u
pascal@3319 40 replay.u
pascal@3319 41 ris.u
pascal@3578 42 dpkg_deb.u
pascal@3613 43 ionice.u
pascal@3635 44 syslogd.u
pascal@3880 45 iptunnel.u
pascal@3963 46 rpm2cpio.u
pascal@2195 47 EOT
pascal@3635 48 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config
pascal@2195 49 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
pascal@2195 50 make oldconfig
pascal@2195 51 make && make install
pascal@2195 52 echo "Chmod 4755 on busybox binary..."
pascal@2195 53 chmod 4755 _install/bin/busybox
pascal@2195 54 }
pascal@2195 55
pascal@2195 56 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@2195 57 genpkg_rules()
pascal@2195 58 {
pascal@2195 59 cp -a $src/_install/* $fs
pascal@3589 60 rm -f $fs/sbin/depmod $fs/usr/bin/ar
pascal@2237 61 cp -a stuff/etc $fs
pascal@2195 62 mkdir -p $fs/etc/init.d
pascal@2195 63 # Busybox config files.
pascal@4962 64 # genpkg busybox-pam depends on busybox config files
pascal@4962 65 # Note: no space/tab before WANTED
pascal@4962 66 WANTED="busybox"
pascal@3635 67 cd $WOK/$SOURCE
pascal@2196 68 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
pascal@2195 69 cp stuff/busybox.conf $fs/etc
pascal@2195 70 chmod 600 $fs/etc/busybox.conf
pascal@2195 71 cp stuff/dnsd.conf $fs/etc
pascal@2195 72 cp stuff/udhcpd.conf $fs/etc
pascal@2195 73 touch $fs/etc/resolv.conf
pascal@2195 74 cp stuff/inetd.conf $fs/etc
pascal@2195 75 cp stuff/dnsd $fs/etc/init.d
pascal@2195 76 cp stuff/udhcpd $fs/etc/init.d
pascal@2195 77 cp stuff/inetd $fs/etc/init.d
pascal@2195 78 cp stuff/zcip $fs/etc/init.d
pascal@2195 79 cp stuff/init $fs
pascal@2195 80 rm $fs/linuxrc
pascal@2195 81 mkdir -p $fs/etc/modprobe.d
pascal@2195 82 # Udhcpc stuff.
pascal@2195 83 mkdir -p $fs/usr/share/udhcpc
pascal@2195 84 cp stuff/udhcp.script \
pascal@2195 85 $fs/usr/share/udhcpc/default.script
pascal@2195 86 chmod +x $fs/usr/share/udhcpc/default.script
pascal@2195 87 # ZeroConf stuff.
pascal@2195 88 cp stuff/zcip.script $fs/etc
pascal@2617 89 # .desktop stuff
pascal@2617 90 mkdir -p $fs/usr/share
pascal@2617 91 cp -a stuff/applications $fs/usr/share
pascal@2195 92 }
pascal@2195 93
pascal@2195 94 # Force glibc-2.7 reinstall if 2.3.6 still in use.
pascal@2195 95 pre_install()
pascal@2195 96 {
pascal@5015 97 local i
pascal@2195 98 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
pascal@2195 99 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
pascal@2195 100 tazpkg get-install glibc-base --forced
pascal@2195 101 fi
pascal@5015 102 answer=""
pascal@5015 103 while read i ; do
pascal@5015 104 [ -e $ROOT$i ] || continue
pascal@5015 105 if [ -z "$answer" ]; then
pascal@5015 106 echo -n "Keep installed GNU utilities ? "
pascal@5015 107 read answer
pascal@5015 108 case "$answer" in
pascal@5015 109 y*|Y*|o*|O*);;
pascal@5015 110 *) break;;
pascal@5015 111 esac
pascal@5015 112 fi
pascal@5015 113 mv $ROOT$i $ROOT$i-busybox-install
pascal@5015 114 done < $1$INSTALLED/$PACKAGE/files.list
pascal@2195 115 }
pascal@2195 116
pascal@2195 117 post_install()
pascal@2195 118 {
pascal@5015 119 local i
pascal@2195 120 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
pascal@5015 121 while read i ; do
pascal@5015 122 [ -e $ROOT$i-busybox-install ] || continue
pascal@5015 123 mv $ROOT$i-busybox-install $ROOT$i
pascal@5015 124 done < $1$INSTALLED/$PACKAGE/files.list
pascal@2195 125 }