wok view busybox/receipt @ rev 1442

linux lzma hardinfo etherboot mISDN busybox: apply path once
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 02 16:39:02 2008 +0000 (2008-10-02)
parents a4138e62dd41
children 3d99ad142611
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 if [ -f done.$file ]; then
21 echo "Skipping $file"
22 continue
23 fi
24 echo "Apply $file..."
25 patch -p1 < ../stuff/$file || return 1
26 touch done.$file
27 done <<EOT
28 $PACKAGE-$VERSION-vcsa2txt.u
29 $PACKAGE-$VERSION-dhcpc.u
30 $PACKAGE-$VERSION-cpio-mkdir.u
31 $PACKAGE-$VERSION-tar.u
32 $PACKAGE-$VERSION-stat.u
33 $PACKAGE-$VERSION-zmodules.u
34 $PACKAGE-$VERSION-modinfo.u
35 $PACKAGE-$VERSION-modprobe.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 cd $fs
61 rm linuxrc
62 ln -s bin/busybox init
63 cd $WOK/$PACKAGE
64 mkdir -p $fs/etc/modprobe.d
65 # Udhcpc stuff.
66 mkdir -p $fs/usr/share/udhcpc
67 cp $src/examples/udhcp/simple.script \
68 $fs/usr/share/udhcpc/default.script
69 chmod +x $fs/usr/share/udhcpc/default.script
70 # ZeroConf stuff.
71 cp stuff/zcip.script $fs/etc
72 }
74 # Force glibc-2.7 reinstall if 2.3.6 still in use.
75 pre_install()
76 {
77 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
78 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
79 tazpkg get-install glibc-base --forced
80 fi
81 }
83 post_install()
84 {
85 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
86 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
87 etc/dnsd.conf
88 etc/inetd.conf
89 etc/udhcpd.conf
90 etc/resolv.conf
91 EOT
92 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
93 }
95 repack_cleanup()
96 {
97 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
98 }