wok-next view busybox/receipt @ rev 8489
Fixed libsdl to have libglu-mesa has build depend so it will have opengl support.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Feb 09 15:49:08 2011 +0000 (2011-02-09) |
parents | 0d7cf47babb3 |
children | dcbf930501e9 |
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 apply_bb_patchs()
16 {
17 cd $src
18 while read file; do
19 [ -f done.$file ] && continue
20 echo "Apply $file..."
21 patch -p1 < ../stuff/$PACKAGE-${VERSION%.*}-$file || return 1
22 touch done.$file
23 done <<EOT
24 tar.u
25 stat.u
26 ris.u
27 zmodules.u
28 printable.u
29 cmdline.u
30 EOT
31 cp ../stuff/$PACKAGE-${VERSION%.*}.config .config
32 }
34 # Rules to compile & install the temporary toolchain.
35 cook_tmp_toolchain()
36 {
37 { apply_bb_patchs &&
38 make oldconfig &&
39 make &&
40 make CONFIG_PREFIX=/tools install
41 } || return 1
42 echo "Chmod 4755 on busybox binary..."
43 chmod 4755 /tools/bin/busybox
44 }
46 # Rules to configure and make the package.
47 compile_rules()
48 {
49 { apply_bb_patchs &&
50 make oldconfig &&
51 make &&
52 make install
53 } || return 1
54 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
55 make oldconfig && make || return 1
56 mv busybox busybox-pam
57 cp ../stuff/$PACKAGE-${VERSION%.*}.config-static .config
58 make oldconfig && make || return 1
59 mv busybox busybox-static
60 }
62 # Rules to gen a SliTaz package suitable for Tazpkg.
63 genpkg_rules()
64 {
65 cp -a $src/_install/* $fs
66 rm -f $fs/bin/bbconfig $fs/usr/bin/ar
67 mkdir -p $fs/etc/init.d
68 # Busybox config files.
69 cp stuff/busybox.conf $fs/etc
70 chmod 600 $fs/etc/busybox.conf
71 cp stuff/dnsd.conf $fs/etc
72 cp stuff/udhcpd.conf $fs/etc
73 touch $fs/etc/resolv.conf
74 cp stuff/inetd.conf $fs/etc
75 cp stuff/daemon $fs/etc/init.d
76 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
77 udhcpd zcip ; do
78 grep -qi config_$i=y $src/.config &&
79 ln -s daemon $fs/etc/init.d/$i
80 done
81 cp stuff/init $fs
82 rm $fs/linuxrc
83 mkdir -p $fs/etc/modprobe.d
84 # Udhcpc stuff.
85 mkdir -p $fs/usr/share/udhcpc
86 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
87 chmod +x $fs/usr/share/udhcpc/default.script
88 # ZeroConf stuff.
89 cp stuff/zcip.script $fs/etc
90 # Httpd stuff.
91 cp stuff/httpd_helper.sh $fs/usr/bin
92 chmod +x $fs/usr/bin/httpd_helper.sh
93 # .desktop stuff
94 mkdir -p $fs/usr/share
95 cp -a stuff/applications $fs/usr/share
96 }
98 # Force glibc-2.7 reinstall if 2.3.6 still in use.
99 pre_install()
100 {
101 local i
102 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
103 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
104 tazpkg get-install glibc-base --forced
105 fi
106 answer=""
107 for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
108 [ -f $1$i ] || continue
109 case "$i" in
110 /bin/busybox) continue ;;
111 *bin/*) ;;
112 *) continue ;;
113 esac
114 if [ -z "$answer" ]; then
115 echo -n "Keep installed GNU utilities ? "
116 read -t 30 answer # by default: keep
117 case "$answer" in
118 n*|N*) break;;
119 *) answer="Y";;
120 esac
121 fi
122 cp -a $1$i $1$i-busybox-install
123 done
124 }
126 post_install()
127 {
128 local i
129 [ -f /etc/resolv.conf-busybox-install ] &&
130 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
131 while read i ; do
132 [ -f $1$i-busybox-install ] || continue
133 mv $1$i-busybox-install $1$i
134 done < $1$INSTALLED/$PACKAGE/files.list
135 chmod 4755 $1/bin/busybox
136 sed -i "s@vcsa2txt.*\$@busybox conspy -d | sed 's/ *\$//;/^\$/d;/^Processi\\\\|^.witchi/,\$!d' > /var/log/boot.log@" $1/etc/init.d/rcS
137 }