wok view busybox/receipt @ rev 1196

busybox/syslogd: up to 1024 char/line
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 07 12:08:35 2008 +0000 (2008-08-07)
parents d2ed22109d90
children 8a7fbe920ac6
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox"
4 VERSION="1.10.3"
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 patch -p1 < ../stuff/$file || return 1
21 done <<EOT
22 $PACKAGE-$VERSION-patch.u
23 $PACKAGE-$VERSION-vcsa2txt.u
24 $PACKAGE-$VERSION-cpio.u
25 $PACKAGE-$VERSION-dhcpc.u
26 $PACKAGE-$VERSION-cpio-mkdir.u
27 $PACKAGE-$VERSION-cpio-mtime.u
28 $PACKAGE-$VERSION-unlzma.u
29 $PACKAGE-$VERSION-tftp.u
30 $PACKAGE-$VERSION-tar.u
31 $PACKAGE-$VERSION-script.u
32 $PACKAGE-$VERSION-header_tar.u
33 $PACKAGE-$VERSION-stat.u
34 $PACKAGE-$VERSION-syslogd.u
35 EOT
36 cp ../stuff/$PACKAGE-$VERSION.config .config
37 make oldconfig
38 make && make install
39 echo "Chmod 4755 on busybox binary..."
40 chmod 4755 _install/bin/busybox
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 cp -a $src/_install/* $fs
47 mkdir -p $fs/etc/init.d
48 # Busybox config files.
49 cp stuff/busybox.conf $fs/etc
50 chmod 600 $fs/etc/busybox.conf
51 cp stuff/dnsd.conf $fs/etc
52 cp stuff/udhcpd.conf $fs/etc
53 touch $fs/etc/resolv.conf
54 cp stuff/inetd.conf $fs/etc
55 cp stuff/dnsd $fs/etc/init.d
56 cp stuff/udhcpd $fs/etc/init.d
57 cp stuff/inetd $fs/etc/init.d
58 cp stuff/zcip $fs/etc/init.d
59 cd $fs
60 rm linuxrc
61 ln -s bin/busybox init
62 cd $WOK/$PACKAGE
63 # Udhcpc stuff.
64 mkdir -p $fs/usr/share/udhcpc
65 cp $src/examples/udhcp/simple.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 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
84 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
85 etc/dnsd.conf
86 etc/inetd.conf
87 etc/udhcpd.conf
88 etc/resolv.conf
89 EOT
90 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
91 }
93 repack_cleanup()
94 {
95 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
96 }