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

busybox: ensure mod is 4755 (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jul 02 17:01:04 2010 +0200 (2010-07-02)
parents 609498d2778d
children 74d790665d71
rev   line source
pascal@2195 1 # SliTaz package receipt.
pascal@2195 2
pascal@2195 3 PACKAGE="busybox-pam"
pascal@5684 4 VERSION="1.16.1"
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@5684 28 ftpd.u
pascal@2195 29 cpio-mkdir.u
pascal@2195 30 tar.u
pascal@2195 31 stat.u
pascal@3319 32 ris.u
pascal@3578 33 dpkg_deb.u
pascal@3635 34 syslogd.u
pascal@5684 35 modinfo.u
pascal@5684 36 zmodules.u
pascal@5692 37 modprobe.u
pascal@2195 38 EOT
pascal@3635 39 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config
pascal@2195 40 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
pascal@2195 41 make oldconfig
pascal@5684 42 # "CFLAGS=-O0" is a workaround for GCC 4.5.0
pascal@5692 43 make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" 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@3589 52 rm -f $fs/sbin/depmod $fs/usr/bin/ar
pascal@2237 53 cp -a stuff/etc $fs
pascal@2195 54 mkdir -p $fs/etc/init.d
pascal@2195 55 # Busybox config files.
pascal@4962 56 # genpkg busybox-pam depends on busybox config files
pascal@4962 57 # Note: no space/tab before WANTED
pascal@4962 58 WANTED="busybox"
pascal@3635 59 cd $WOK/$SOURCE
pascal@2196 60 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
pascal@2195 61 cp stuff/busybox.conf $fs/etc
pascal@2195 62 chmod 600 $fs/etc/busybox.conf
pascal@2195 63 cp stuff/dnsd.conf $fs/etc
pascal@2195 64 cp stuff/udhcpd.conf $fs/etc
pascal@2195 65 touch $fs/etc/resolv.conf
pascal@2195 66 cp stuff/inetd.conf $fs/etc
pascal@5684 67 cp stuff/daemon $fs/etc/init.d
pascal@5684 68 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
pascal@5684 69 udhcpd zcip ; do
pascal@5684 70 grep -qi config_$i=y $src/.config &&
pascal@5684 71 ln -s daemon $fs/etc/init.d/$i
pascal@5684 72 done
pascal@2195 73 cp stuff/init $fs
pascal@2195 74 rm $fs/linuxrc
pascal@2195 75 mkdir -p $fs/etc/modprobe.d
pascal@2195 76 # Udhcpc stuff.
pascal@2195 77 mkdir -p $fs/usr/share/udhcpc
pascal@5684 78 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
pascal@2195 79 chmod +x $fs/usr/share/udhcpc/default.script
pascal@2195 80 # ZeroConf stuff.
pascal@2195 81 cp stuff/zcip.script $fs/etc
pascal@5684 82 # Httpd stuff.
pascal@5684 83 cp stuff/httpd_helper.sh $fs/usr/bin
pascal@5684 84 chmod +x $fs/usr/bin/httpd_helper.sh
pascal@2617 85 # .desktop stuff
pascal@2617 86 mkdir -p $fs/usr/share
pascal@2617 87 cp -a stuff/applications $fs/usr/share
pascal@2195 88 }
pascal@2195 89
pascal@2195 90 # Force glibc-2.7 reinstall if 2.3.6 still in use.
pascal@2195 91 pre_install()
pascal@2195 92 {
pascal@5015 93 local i
pascal@2195 94 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
pascal@2195 95 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
pascal@2195 96 tazpkg get-install glibc-base --forced
pascal@2195 97 fi
pascal@5015 98 answer=""
pascal@5015 99 while read i ; do
pascal@5749 100 [ -e $1$i ] || continue
pascal@5015 101 if [ -z "$answer" ]; then
pascal@5015 102 echo -n "Keep installed GNU utilities ? "
pascal@5015 103 read answer
pascal@5015 104 case "$answer" in
pascal@5015 105 y*|Y*|o*|O*);;
pascal@5015 106 *) break;;
pascal@5015 107 esac
pascal@5015 108 fi
pascal@5749 109 mv $1$i $1$i-busybox-install
pascal@5015 110 done < $1$INSTALLED/$PACKAGE/files.list
pascal@2195 111 }
pascal@2195 112
pascal@2195 113 post_install()
pascal@2195 114 {
pascal@5015 115 local i
pascal@2195 116 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
pascal@5015 117 while read i ; do
pascal@5749 118 [ -e $1$i-busybox-install ] || continue
pascal@5749 119 mv $1$i-busybox-install $1$i
pascal@5015 120 done < $1$INSTALLED/$PACKAGE/files.list
pascal@5749 121 chmod 4755 $1/bin/busybox
pascal@2195 122 }