wok view busybox/receipt @ rev 2585

busybox/install: add -D support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 07 16:03:51 2009 +0000 (2009-04-07)
parents b5c440736bca
children f40ed77124a0
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 EOT
37 cp ../stuff/$PACKAGE-$VERSION.config .config
38 make oldconfig
39 make && make install
40 echo "Chmod 4755 on busybox binary..."
41 chmod 4755 _install/bin/busybox
42 }
44 # Rules to gen a SliTaz package suitable for Tazpkg.
45 genpkg_rules()
46 {
47 cp -a $src/_install/* $fs
48 mkdir -p $fs/etc/init.d
49 # Busybox config files.
50 cp stuff/busybox.conf $fs/etc
51 chmod 600 $fs/etc/busybox.conf
52 cp stuff/dnsd.conf $fs/etc
53 cp stuff/udhcpd.conf $fs/etc
54 touch $fs/etc/resolv.conf
55 cp stuff/inetd.conf $fs/etc
56 cp stuff/dnsd $fs/etc/init.d
57 cp stuff/udhcpd $fs/etc/init.d
58 cp stuff/inetd $fs/etc/init.d
59 cp stuff/zcip $fs/etc/init.d
60 cp stuff/init $fs
61 rm $fs/linuxrc
62 mkdir -p $fs/etc/modprobe.d
63 # Udhcpc stuff.
64 mkdir -p $fs/usr/share/udhcpc
65 cp stuff/udhcp.script \
66 $fs/usr/share/udhcpc/default.script
67 chmod +x $fs/usr/share/udhcpc/default.script
68 # ZeroConf stuff.
69 cp stuff/zcip.script $fs/etc
70 }
72 # Force glibc-2.7 reinstall if 2.3.6 still in use.
73 pre_install()
74 {
75 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
76 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
77 tazpkg get-install glibc-base --forced
78 fi
79 }
81 post_install()
82 {
83 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
84 }