wok-next view busybox/receipt @ rev 983
busybox: do not wipe out nameserver during install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jul 01 21:15:12 2008 +0000 (2008-07-01) |
parents | be0892d9efd5 |
children | 48fcd5723861 |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox"
4 VERSION="1.11.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"
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"
14 # Rules to configure and make the package.
15 compile_rules()
16 {
17 cd $src
18 while read file; do
19 patch -p1 < ../stuff/$file || return 1
20 done <<EOT
21 $PACKAGE-$VERSION-vcsa2txt.u
22 $PACKAGE-$VERSION-dhcpc.u
23 $PACKAGE-$VERSION-cpio-mkdir.u
24 $PACKAGE-$VERSION-cpio-mtime.u
25 $PACKAGE-$VERSION-unlzma.u
26 $PACKAGE-$VERSION-tar.u
27 $PACKAGE-$VERSION-stat.u
28 EOT
29 cp ../stuff/$PACKAGE-$VERSION.config .config
30 make oldconfig
31 make && make install
32 echo "Chmod 4755 on busybox binary..."
33 chmod 4755 _install/bin/busybox
34 }
36 # Rules to gen a SliTaz package suitable for Tazpkg.
37 genpkg_rules()
38 {
39 cp -a $src/_install/* $fs
40 mkdir -p $fs/etc/init.d
41 # Busybox config files.
42 cp stuff/busybox.conf $fs/etc
43 chmod 600 $fs/etc/busybox.conf
44 cp stuff/dnsd.conf $fs/etc
45 cp stuff/udhcpd.conf $fs/etc
46 touch $fs/etc/resolv.conf
47 cp stuff/inetd.conf $fs/etc
48 cp stuff/dnsd $fs/etc/init.d
49 cp stuff/udhcpd $fs/etc/init.d
50 cp stuff/inetd $fs/etc/init.d
51 cp stuff/zcip $fs/etc/init.d
52 cd $fs
53 rm linuxrc
54 ln -s bin/busybox init
55 cd $WOK/$PACKAGE
56 # Udhcpc stuff.
57 mkdir -p $fs/usr/share/udhcpc
58 cp $src/examples/udhcp/simple.script \
59 $fs/usr/share/udhcpc/default.script
60 chmod +x $fs/usr/share/udhcpc/default.script
61 # ZeroConf stuff.
62 cp stuff/zcip.script $fs/etc
63 }
65 # Force glibc-2.7 reinstall if 2.3.6 still in use.
66 pre_install()
67 {
68 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
69 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
70 tazpkg get-install glibc-base --forced
71 fi
72 }
74 post_install()
75 {
76 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
77 }