wok-6.x view busybox/receipt @ rev 3216

busybox/replay: fix patch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu May 28 15:13:09 2009 +0200 (2009-05-28)
parents 06919248a0c2
children c29319d0340a
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 basename.u
37 unlzma.u
38 replay.u
39 EOT
40 cp ../stuff/$PACKAGE-$VERSION.config .config
41 make oldconfig
42 make && make install
43 echo "Chmod 4755 on busybox binary..."
44 chmod 4755 _install/bin/busybox
45 }
47 # Rules to gen a SliTaz package suitable for Tazpkg.
48 genpkg_rules()
49 {
50 cp -a $src/_install/* $fs
51 rm -f $fs/sbin/depmod
52 mkdir -p $fs/etc/init.d
53 # Busybox config files.
54 cp stuff/busybox.conf $fs/etc
55 chmod 600 $fs/etc/busybox.conf
56 cp stuff/dnsd.conf $fs/etc
57 cp stuff/udhcpd.conf $fs/etc
58 touch $fs/etc/resolv.conf
59 cp stuff/inetd.conf $fs/etc
60 cp stuff/dnsd $fs/etc/init.d
61 cp stuff/udhcpd $fs/etc/init.d
62 cp stuff/inetd $fs/etc/init.d
63 cp stuff/zcip $fs/etc/init.d
64 cp stuff/init $fs
65 rm $fs/linuxrc
66 mkdir -p $fs/etc/modprobe.d
67 # Udhcpc stuff.
68 mkdir -p $fs/usr/share/udhcpc
69 cp stuff/udhcp.script \
70 $fs/usr/share/udhcpc/default.script
71 chmod +x $fs/usr/share/udhcpc/default.script
72 # ZeroConf stuff.
73 cp stuff/zcip.script $fs/etc
74 }
76 # Force glibc-2.7 reinstall if 2.3.6 still in use.
77 pre_install()
78 {
79 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
80 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
81 tazpkg get-install glibc-base --forced
82 fi
83 }
85 post_install()
86 {
87 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
88 }