wok-stable view busybox/receipt @ rev 9635
busybox: remove .desktop files covered by tazpanel
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Apr 26 19:06:48 2011 +0200 (2011-04-26) |
parents | 156116e8b1c3 |
children | 712b7c1ce69a |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox"
4 VERSION="1.18.4"
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 conspy.u
31 EOT
32 cp $stuff/$PACKAGE-${VERSION%.*}.config .config
33 }
35 # Rules to compile & install the temporary toolchain.
36 cook_tmp_toolchain()
37 {
38 { apply_bb_patchs &&
39 make oldconfig &&
40 make &&
41 make CONFIG_PREFIX=/tools install
42 } || return 1
43 echo "Chmod 4755 on busybox binary..."
44 chmod 4755 /tools/bin/busybox
45 }
47 # Rules to configure and make the package.
48 compile_rules()
49 {
50 { apply_bb_patchs &&
51 make oldconfig &&
52 make &&
53 make install
54 } || return 1
55 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
56 make oldconfig && make || return 1
57 mv busybox busybox-pam
58 cp $stuff/$PACKAGE-${VERSION%.*}.config-static .config
59 make oldconfig && make || return 1
60 mv busybox busybox-static
61 }
63 # Rules to gen a SliTaz package suitable for Tazpkg.
64 genpkg_rules()
65 {
66 cp -a $src/_install/* $fs
67 rm -f $fs/bin/bbconfig $fs/usr/bin/ar
68 mkdir -p $fs/etc/init.d
69 # Busybox config files.
70 cp $stuff/busybox.conf $fs/etc
71 chmod 600 $fs/etc/busybox.conf
72 cp $stuff/dnsd.conf $fs/etc
73 cp $stuff/udhcpd.conf $fs/etc
74 touch $fs/etc/resolv.conf
75 cp $stuff/inetd.conf $fs/etc
76 cp $stuff/daemon $fs/etc/init.d
77 DAEMON="crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd udhcpd zcip"
78 for i in $DAEMON; do
79 grep -qi config_$i=y $stuff/$PACKAGE-${VERSION%.*}.config &&
80 ln -s daemon $fs/etc/init.d/$i
81 done
82 cp $stuff/init $fs
83 rm $fs/linuxrc
84 mkdir -p $fs/etc/modprobe.d
85 # Udhcpc stuff.
86 mkdir -p $fs/usr/share/udhcpc
87 cp $stuff/udhcp.script $fs/usr/share/udhcpc/default.script
88 chmod +x $fs/usr/share/udhcpc/default.script
89 # ZeroConf stuff.
90 cp $stuff/zcip.script $fs/etc
91 # Httpd stuff.
92 cp $stuff/httpd_helper.sh $fs/usr/bin
93 chmod +x $fs/usr/bin/httpd_helper.sh
94 }
96 # Force glibc-2.7 reinstall if 2.3.6 still in use.
97 pre_install()
98 {
99 local i
100 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
101 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
102 tazpkg get-install glibc-base --forced
103 fi
104 answer=""
105 for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
106 [ -f $1$i ] || continue
107 case "$i" in
108 /bin/busybox) continue ;;
109 *bin/*) ;;
110 *) continue ;;
111 esac
112 if [ -z "$answer" ]; then
113 echo -n "Keep installed GNU utilities ? "
114 read -t 30 answer # by default: keep
115 case "$answer" in
116 n*|N*) break;;
117 *) answer="Y";;
118 esac
119 fi
120 cp -a $1$i $1$i-busybox-install
121 done
122 }
124 post_install()
125 {
126 local i
127 [ -f /etc/resolv.conf-busybox-install ] &&
128 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
129 while read i ; do
130 [ -f $1$i-busybox-install ] || continue
131 mv $1$i-busybox-install $1$i
132 done < $1$INSTALLED/$PACKAGE/files.list
133 chmod 4755 $1/bin/busybox
134 }
136 pre_remove()
137 {
138 # We can not remove this package !
139 exit 1
140 }