wok view busybox/receipt @ rev 1408
Add php-cups
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 24 08:10:52 2008 +0000 (2008-09-24) |
parents | 8a7fbe920ac6 |
children | e64f8e87ea6d |
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 $PACKAGE-$VERSION-modprobe.u
31 EOT
32 cp ../stuff/$PACKAGE-$VERSION.config .config
33 make oldconfig
34 make && make install
35 echo "Chmod 4755 on busybox binary..."
36 chmod 4755 _install/bin/busybox
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 cp -a $src/_install/* $fs
43 mkdir -p $fs/etc/init.d
44 # Busybox config files.
45 cp stuff/busybox.conf $fs/etc
46 chmod 600 $fs/etc/busybox.conf
47 cp stuff/dnsd.conf $fs/etc
48 cp stuff/udhcpd.conf $fs/etc
49 touch $fs/etc/resolv.conf
50 cp stuff/inetd.conf $fs/etc
51 cp stuff/dnsd $fs/etc/init.d
52 cp stuff/udhcpd $fs/etc/init.d
53 cp stuff/inetd $fs/etc/init.d
54 cp stuff/zcip $fs/etc/init.d
55 cd $fs
56 rm linuxrc
57 ln -s bin/busybox init
58 cd $WOK/$PACKAGE
59 mkdir -p $fs/etc/modprobe.d
60 # Udhcpc stuff.
61 mkdir -p $fs/usr/share/udhcpc
62 cp $src/examples/udhcp/simple.script \
63 $fs/usr/share/udhcpc/default.script
64 chmod +x $fs/usr/share/udhcpc/default.script
65 # ZeroConf stuff.
66 cp stuff/zcip.script $fs/etc
67 }
69 # Force glibc-2.7 reinstall if 2.3.6 still in use.
70 pre_install()
71 {
72 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
73 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
74 tazpkg get-install glibc-base --forced
75 fi
76 }
78 post_install()
79 {
80 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
81 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
82 etc/dnsd.conf
83 etc/inetd.conf
84 etc/udhcpd.conf
85 etc/resolv.conf
86 EOT
87 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
88 }
90 repack_cleanup()
91 {
92 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
93 }