wok-next view busybox/receipt @ rev 5195
slitaz-doc: fix version for 3.0
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Mar 28 17:16:33 2010 +0200 (2010-03-28) |
parents | 530fd66414e7 |
children | 1959b2e6b8a0 |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox"
4 VERSION="1.12.0"
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"
9 BUILD_DEPENDS="bzip2"
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 configure and make the package.
16 compile_rules()
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 vcsa2txt.u
26 dhcpc.u
27 cpio-mkdir.u
28 tar.u
29 stat.u
30 zmodules.u
31 modinfo.u
32 modprobe.u
33 paths.u
34 mkswap.u
35 install.u
36 basename.u
37 unlzma.u
38 replay.u
39 ris.u
40 dpkg_deb.u
41 ionice.u
42 syslogd.u
43 iptunnel.u
44 rpm2cpio.u
45 EOT
46 cp ../stuff/$PACKAGE-$VERSION.config .config
47 make oldconfig
48 make && make install
49 echo "Chmod 4755 on busybox binary..."
50 chmod 4755 _install/bin/busybox
51 }
53 # Rules to gen a SliTaz package suitable for Tazpkg.
54 genpkg_rules()
55 {
56 cp -a $src/_install/* $fs
57 rm -f $fs/sbin/depmod $fs/usr/bin/ar
58 mkdir -p $fs/etc/init.d
59 # Busybox config files.
60 cp stuff/busybox.conf $fs/etc
61 chmod 600 $fs/etc/busybox.conf
62 cp stuff/dnsd.conf $fs/etc
63 cp stuff/udhcpd.conf $fs/etc
64 touch $fs/etc/resolv.conf
65 cp stuff/inetd.conf $fs/etc
66 cp stuff/dnsd $fs/etc/init.d
67 cp stuff/udhcpd $fs/etc/init.d
68 cp stuff/inetd $fs/etc/init.d
69 cp stuff/zcip $fs/etc/init.d
70 cp stuff/init $fs
71 rm $fs/linuxrc
72 mkdir -p $fs/etc/modprobe.d
73 # Udhcpc stuff.
74 mkdir -p $fs/usr/share/udhcpc
75 cp stuff/udhcp.script \
76 $fs/usr/share/udhcpc/default.script
77 chmod +x $fs/usr/share/udhcpc/default.script
78 # ZeroConf stuff.
79 cp stuff/zcip.script $fs/etc
80 }
82 # Force glibc-2.7 reinstall if 2.3.6 still in use.
83 pre_install()
84 {
85 local i
86 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
87 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
88 tazpkg get-install glibc-base --forced
89 fi
90 answer=""
91 while read i ; do
92 [ -e $ROOT$i ] || continue
93 if [ -z "$answer" ]; then
94 echo -n "Keep installed GNU utilities ? "
95 read answer
96 case "$answer" in
97 y*|Y*|o*|O*);;
98 *) break;;
99 esac
100 fi
101 mv $ROOT$i $ROOT$i-busybox-install
102 done < $1$INSTALLED/$PACKAGE/files.list
103 }
105 post_install()
106 {
107 local i
108 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
109 while read i ; do
110 [ -e $ROOT$i-busybox-install ] || continue
111 mv $ROOT$i-busybox-install $ROOT$i
112 done < $1$INSTALLED/$PACKAGE/files.list
113 }