wok-4.x view busybox/receipt @ rev 8159

Updated busybox for tazwok-experimental.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Jan 26 18:02:11 2011 +0000 (2011-01-26)
parents 1867cba0ced3
children 890c8247a349
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox"
4 VERSION="1.18.2"
5 CATEGORY="base-system"
6 SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="slitaz-base-files glibc-base ncurses-common"
9 BUILD_DEPENDS="bzip2 pam pam-dev uclibc-cross-compiler-i486"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.busybox.net/"
12 WGET_URL="http://www.busybox.net/downloads/$TARBALL"
13 CONFIG_FILES="/etc/dnsd.conf /etc/inetd.conf /etc/udhcpd.conf /etc/resolv.conf"
15 # Rules to compile & install the temporary toolchain.
16 cook_tmp_toolchain()
17 {
18 cd $src
19 while read file; do
20 [ -f done.$file ] && continue
21 echo "Apply $file..."
22 patch -p1 < ../stuff/$PACKAGE-$VERSION-$file || return 1
23 touch done.$file
24 done <<EOT
25 tar.u
26 stat.u
27 ris.u
28 zmodules.u
29 printable.u
30 cmdline.u
31 cpio.u
32 EOT
33 cp ../stuff/$PACKAGE-$VERSION.config .config
34 { make oldconfig &&
35 make &&
36 make CONFIG_PREFIX=/tools install
37 } || return 1
38 echo "Chmod 4755 on busybox binary..."
39 chmod 4755 /tools/bin/busybox
40 }
42 # Rules to configure and make the package.
43 compile_rules()
44 {
45 cd $src
46 while read file; do
47 [ -f done.$file ] && continue
48 echo "Apply $file..."
49 patch -p1 < ../stuff/$PACKAGE-$VERSION-$file || return 1
50 touch done.$file
51 done <<EOT
52 tar.u
53 stat.u
54 ris.u
55 zmodules.u
56 printable.u
57 cmdline.u
58 cpio.u
59 EOT
60 cp ../stuff/$PACKAGE-$VERSION.config .config
61 make oldconfig
62 make || return 1
63 make install || return 1
64 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
65 make oldconfig
66 make || return 1
67 mv busybox busybox-pam
68 cp ../stuff/$PACKAGE-$VERSION.config-static .config
69 make oldconfig
70 make || return 1
71 mv busybox busybox-static
72 }
74 # Rules to gen a SliTaz package suitable for Tazpkg.
75 genpkg_rules()
76 {
77 cp -a $src/_install/* $fs
78 rm -f $fs/bin/bbconfig $fs/usr/bin/ar
79 mkdir -p $fs/etc/init.d
80 # Busybox config files.
81 cp stuff/busybox.conf $fs/etc
82 chmod 600 $fs/etc/busybox.conf
83 cp stuff/dnsd.conf $fs/etc
84 cp stuff/udhcpd.conf $fs/etc
85 touch $fs/etc/resolv.conf
86 cp stuff/inetd.conf $fs/etc
87 cp stuff/daemon $fs/etc/init.d
88 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
89 udhcpd zcip ; do
90 grep -qi config_$i=y $src/.config &&
91 ln -s daemon $fs/etc/init.d/$i
92 done
93 cp stuff/init $fs
94 rm $fs/linuxrc
95 mkdir -p $fs/etc/modprobe.d
96 # Udhcpc stuff.
97 mkdir -p $fs/usr/share/udhcpc
98 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
99 chmod +x $fs/usr/share/udhcpc/default.script
100 # ZeroConf stuff.
101 cp stuff/zcip.script $fs/etc
102 # Httpd stuff.
103 cp stuff/httpd_helper.sh $fs/usr/bin
104 chmod +x $fs/usr/bin/httpd_helper.sh
105 # .desktop stuff
106 mkdir -p $fs/usr/share
107 cp -a stuff/applications $fs/usr/share
108 }
110 # Force glibc-2.7 reinstall if 2.3.6 still in use.
111 pre_install()
112 {
113 local i
114 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
115 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
116 tazpkg get-install glibc-base --forced
117 fi
118 answer=""
119 for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
120 [ -f $1$i ] || continue
121 case "$i" in
122 /bin/busybox) continue ;;
123 *bin/*) ;;
124 *) continue ;;
125 esac
126 if [ -z "$answer" ]; then
127 echo -n "Keep installed GNU utilities ? "
128 read -t 30 answer # by default: keep
129 case "$answer" in
130 n*|N*) break;;
131 *) answer="Y";;
132 esac
133 fi
134 cp -a $1$i $1$i-busybox-install
135 done
136 }
138 post_install()
139 {
140 local i
141 [ -f /etc/resolv.conf-busybox-install ] &&
142 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
143 while read i ; do
144 [ -f $1$i-busybox-install ] || continue
145 mv $1$i-busybox-install $1$i
146 done < $1$INSTALLED/$PACKAGE/files.list
147 chmod 4755 $1/bin/busybox
148 sed -i "s@vcsa2txt.*\$@busybox conspy -d | sed 's/ *\$//;/^\$/d;/^Processi\\\\|^.witchi/,\$!d' > /var/log/boot.log@" $1/etc/init.d/rcS
149 }