wok view busybox/receipt @ rev 1299

Up busybox (1.12.0) with built in module-init-tools
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 21 20:11:27 2008 +0000 (2008-08-21)
parents cbb14556d72b
children a4138e62dd41
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"
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 echo "Apply $file..."
21 patch -p1 < ../stuff/$file || return 1
22 done <<EOT
23 $PACKAGE-$VERSION-vcsa2txt.u
24 $PACKAGE-$VERSION-dhcpc.u
25 $PACKAGE-$VERSION-cpio-mkdir.u
26 $PACKAGE-$VERSION-tar.u
27 $PACKAGE-$VERSION-stat.u
28 $PACKAGE-$VERSION-zmodules.u
29 $PACKAGE-$VERSION-modinfo.u
30 EOT
31 cp ../stuff/$PACKAGE-$VERSION.config .config
32 make oldconfig
33 make && make install
34 echo "Chmod 4755 on busybox binary..."
35 chmod 4755 _install/bin/busybox
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 cp -a $src/_install/* $fs
42 mkdir -p $fs/etc/init.d
43 # Busybox config files.
44 cp stuff/busybox.conf $fs/etc
45 chmod 600 $fs/etc/busybox.conf
46 cp stuff/dnsd.conf $fs/etc
47 cp stuff/udhcpd.conf $fs/etc
48 touch $fs/etc/resolv.conf
49 cp stuff/inetd.conf $fs/etc
50 cp stuff/dnsd $fs/etc/init.d
51 cp stuff/udhcpd $fs/etc/init.d
52 cp stuff/inetd $fs/etc/init.d
53 cp stuff/zcip $fs/etc/init.d
54 cd $fs
55 rm linuxrc
56 ln -s bin/busybox init
57 cd $WOK/$PACKAGE
58 mkdir -p $fs/etc/modprobe.d
59 # Udhcpc stuff.
60 mkdir -p $fs/usr/share/udhcpc
61 cp $src/examples/udhcp/simple.script \
62 $fs/usr/share/udhcpc/default.script
63 chmod +x $fs/usr/share/udhcpc/default.script
64 # ZeroConf stuff.
65 cp stuff/zcip.script $fs/etc
66 }
68 # Force glibc-2.7 reinstall if 2.3.6 still in use.
69 pre_install()
70 {
71 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
72 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
73 tazpkg get-install glibc-base --forced
74 fi
75 }
77 post_install()
78 {
79 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
80 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
81 etc/dnsd.conf
82 etc/inetd.conf
83 etc/udhcpd.conf
84 etc/resolv.conf
85 EOT
86 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
87 }
89 repack_cleanup()
90 {
91 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
92 }