wok-6.x view busybox/receipt @ rev 5763
Add linphone
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jul 05 13:05:15 2010 +0200 (2010-07-05) |
parents | 609498d2778d |
children | 74d790665d71 |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox"
4 VERSION="1.16.1"
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 ftpd.u
27 cpio-mkdir.u
28 tar.u
29 stat.u
30 ris.u
31 dpkg_deb.u
32 syslogd.u
33 modinfo.u
34 zmodules.u
35 modprobe.u
36 EOT
37 cp ../stuff/$PACKAGE-$VERSION.config .config
38 make oldconfig
39 if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then
40 # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crach)
41 # "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage)
42 make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
43 else
44 make -j 4 && make install
45 fi
46 echo "Chmod 4755 on busybox binary..."
47 chmod 4755 _install/bin/busybox
48 }
50 # Rules to gen a SliTaz package suitable for Tazpkg.
51 genpkg_rules()
52 {
53 cp -a $src/_install/* $fs
54 rm -f $fs/sbin/depmod $fs/usr/bin/ar
55 mkdir -p $fs/etc/init.d
56 # Busybox config files.
57 cp stuff/busybox.conf $fs/etc
58 chmod 600 $fs/etc/busybox.conf
59 cp stuff/dnsd.conf $fs/etc
60 cp stuff/udhcpd.conf $fs/etc
61 touch $fs/etc/resolv.conf
62 cp stuff/inetd.conf $fs/etc
63 cp stuff/daemon $fs/etc/init.d
64 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
65 udhcpd zcip ; do
66 grep -qi config_$i=y $src/.config &&
67 ln -s daemon $fs/etc/init.d/$i
68 done
69 cp stuff/init $fs
70 rm $fs/linuxrc
71 mkdir -p $fs/etc/modprobe.d
72 # Udhcpc stuff.
73 mkdir -p $fs/usr/share/udhcpc
74 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
75 chmod +x $fs/usr/share/udhcpc/default.script
76 # ZeroConf stuff.
77 cp stuff/zcip.script $fs/etc
78 # Httpd stuff.
79 cp stuff/httpd_helper.sh $fs/usr/bin
80 chmod +x $fs/usr/bin/httpd_helper.sh
81 }
83 # Force glibc-2.7 reinstall if 2.3.6 still in use.
84 pre_install()
85 {
86 local i
87 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
88 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
89 tazpkg get-install glibc-base --forced
90 fi
91 answer=""
92 while read i ; do
93 [ -e $1$i ] || continue
94 if [ -z "$answer" ]; then
95 echo -n "Keep installed GNU utilities ? "
96 read -t 30 answer # by default: keep
97 case "$answer" in
98 n*|N*) break;;
99 *) ;;
100 esac
101 fi
102 mv $1$i $1$i-busybox-install
103 done < $1$INSTALLED/$PACKAGE/files.list
104 }
106 post_install()
107 {
108 local i
109 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
110 while read i ; do
111 [ -e $1$i-busybox-install ] || continue
112 mv $1$i-busybox-install $1$i
113 done < $1$INSTALLED/$PACKAGE/files.list
114 chmod 4755 $1/bin/busybox
115 }