wok-current annotate busybox-pam/receipt @ rev 7217
Up: libfm
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Wed Nov 10 21:35:12 2010 -0500 (2010-11-10) |
parents | a841d189e474 |
children | ca2a832193d8 |
rev | line source |
---|---|
pascal@2195 | 1 # SliTaz package receipt. |
pascal@2195 | 2 |
pascal@2195 | 3 PACKAGE="busybox-pam" |
pascal@6674 | 4 VERSION="1.17.3" |
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@5921 | 14 CONFIG_FILES="/etc/dnsd.conf /etc/inetd.conf /etc/udhcpd.conf /etc/resolv.conf \ |
pascal@5921 | 15 /etc/pam.d" |
pascal@2195 | 16 PROVIDE="busybox:pam" |
pascal@2195 | 17 |
pascal@2195 | 18 # Rules to configure and make the package. |
pascal@2195 | 19 compile_rules() |
pascal@2195 | 20 { |
pascal@2195 | 21 cd $src |
pascal@2195 | 22 while read file; do |
pascal@2195 | 23 [ -f done.$file ] && continue |
pascal@2195 | 24 echo "Apply $file..." |
pascal@3635 | 25 patch -p1 < $WOK/$SOURCE/stuff/$SOURCE-$VERSION-$file || return 1 |
pascal@2195 | 26 touch done.$file |
pascal@2195 | 27 done <<EOT |
pascal@2195 | 28 cpio-mkdir.u |
pascal@2195 | 29 tar.u |
pascal@2195 | 30 stat.u |
pascal@3319 | 31 ris.u |
pascal@5776 | 32 depmod.u |
pascal@5684 | 33 zmodules.u |
pascal@5918 | 34 usage.u |
pascal@2195 | 35 EOT |
pascal@3635 | 36 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config |
pascal@2195 | 37 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config |
pascal@5975 | 38 make oldconfig |
pascal@5924 | 39 if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then |
pascal@5924 | 40 # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash) |
pascal@5924 | 41 # "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage) |
pascal@5924 | 42 make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install |
pascal@5924 | 43 else |
pascal@5924 | 44 make -j 4 && make install |
pascal@5924 | 45 fi |
pascal@2195 | 46 echo "Chmod 4755 on busybox binary..." |
pascal@2195 | 47 chmod 4755 _install/bin/busybox |
pascal@2195 | 48 } |
pascal@2195 | 49 |
pascal@2195 | 50 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@2195 | 51 genpkg_rules() |
pascal@2195 | 52 { |
pascal@2195 | 53 cp -a $src/_install/* $fs |
pascal@2237 | 54 cp -a stuff/etc $fs |
pascal@2195 | 55 mkdir -p $fs/etc/init.d |
pascal@2195 | 56 # Busybox config files. |
pascal@2196 | 57 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs |
slaxemulator@7081 | 58 busybox_stuff=$WOK/$SOURCE/stuff |
slaxemulator@7081 | 59 cp $busybox_stuff/busybox.conf $fs/etc |
pascal@2195 | 60 chmod 600 $fs/etc/busybox.conf |
slaxemulator@7081 | 61 cp $busybox_stuff/dnsd.conf $fs/etc |
slaxemulator@7081 | 62 cp $busybox_stuff/udhcpd.conf $fs/etc |
pascal@2195 | 63 touch $fs/etc/resolv.conf |
slaxemulator@7081 | 64 cp $busybox_stuff/inetd.conf $fs/etc |
slaxemulator@7081 | 65 cp $busybox_stuff/daemon $fs/etc/init.d |
pascal@5684 | 66 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \ |
pascal@5975 | 67 udhcpd zcip ; do |
pascal@5684 | 68 grep -qi config_$i=y $src/.config && |
pascal@5684 | 69 ln -s daemon $fs/etc/init.d/$i |
pascal@5684 | 70 done |
slaxemulator@7081 | 71 cp $busybox_stuff/init $fs |
pascal@2195 | 72 rm $fs/linuxrc |
pascal@2195 | 73 mkdir -p $fs/etc/modprobe.d |
pascal@2195 | 74 # Udhcpc stuff. |
pascal@2195 | 75 mkdir -p $fs/usr/share/udhcpc |
slaxemulator@7081 | 76 cp $busybox_stuff/udhcp.script $fs/usr/share/udhcpc/default.script |
pascal@2195 | 77 chmod +x $fs/usr/share/udhcpc/default.script |
pascal@2195 | 78 # ZeroConf stuff. |
slaxemulator@7081 | 79 cp $busybox_stuff/zcip.script $fs/etc |
pascal@5684 | 80 # Httpd stuff. |
slaxemulator@7081 | 81 cp $busybox_stuff/httpd_helper.sh $fs/usr/bin |
pascal@5684 | 82 chmod +x $fs/usr/bin/httpd_helper.sh |
pascal@2617 | 83 # .desktop stuff |
pascal@2617 | 84 mkdir -p $fs/usr/share |
slaxemulator@7081 | 85 cp -a $busybox_stuff/applications $fs/usr/share |
pascal@2195 | 86 } |
pascal@2195 | 87 |
pascal@2195 | 88 # Force glibc-2.7 reinstall if 2.3.6 still in use. |
pascal@2195 | 89 pre_install() |
pascal@2195 | 90 { |
pascal@5015 | 91 local i |
pascal@2195 | 92 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install |
pascal@2195 | 93 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then |
pascal@2195 | 94 tazpkg get-install glibc-base --forced |
pascal@2195 | 95 fi |
pascal@5015 | 96 answer="" |
pascal@5924 | 97 for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do |
pascal@5863 | 98 [ -f $1$i ] || continue |
pascal@5874 | 99 case "$i" in |
pascal@5874 | 100 /bin/busybox) continue ;; |
pascal@5874 | 101 *bin/*) ;; |
pascal@5874 | 102 *) continue ;; |
pascal@5874 | 103 esac |
pascal@5015 | 104 if [ -z "$answer" ]; then |
pascal@5015 | 105 echo -n "Keep installed GNU utilities ? " |
pascal@5975 | 106 read -t 30 answer # by default: keep |
pascal@5015 | 107 case "$answer" in |
pascal@5975 | 108 n*|N*) break;; |
pascal@5975 | 109 *) answer="Y";; |
pascal@5015 | 110 esac |
pascal@5015 | 111 fi |
pascal@5863 | 112 cp -a $1$i $1$i-busybox-install |
pascal@5924 | 113 done |
pascal@2195 | 114 } |
pascal@2195 | 115 |
pascal@2195 | 116 post_install() |
pascal@2195 | 117 { |
pascal@5015 | 118 local i |
pascal@5924 | 119 [ -f /etc/resolv.conf-busybox-install ] && |
pascal@2195 | 120 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf |
pascal@5015 | 121 while read i ; do |
pascal@5863 | 122 [ -f $1$i-busybox-install ] || continue |
pascal@5749 | 123 mv $1$i-busybox-install $1$i |
pascal@5015 | 124 done < $1$INSTALLED/$PACKAGE/files.list |
pascal@5749 | 125 chmod 4755 $1/bin/busybox |
pascal@5976 | 126 sed -i "s@vcsa2txt.*\$@busybox conspy -d | sed 's/ *\$//;/^\$/d;/^Processi\\\\|^.witchi/,\$!d' > /var/log/boot.log@" $1/etc/init.d/rcS |
pascal@2195 | 127 } |