wok view busybox-pam/receipt @ rev 7145
Add udhcpc6-fake
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Nov 06 16:08:43 2010 +0100 (2010-11-06) |
parents | a841d189e474 |
children | ca2a832193d8 |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox-pam"
4 VERSION="1.17.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 glibc-base pam"
9 BUILD_DEPENDS="bzip2 pam pam-dev"
10 SOURCE="busybox"
11 TARBALL="$SOURCE-$VERSION.tar.bz2"
12 WEB_SITE="http://www.busybox.net/"
13 WGET_URL="http://www.busybox.net/downloads/$TARBALL"
14 CONFIG_FILES="/etc/dnsd.conf /etc/inetd.conf /etc/udhcpd.conf /etc/resolv.conf \
15 /etc/pam.d"
16 PROVIDE="busybox:pam"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
21 cd $src
22 while read file; do
23 [ -f done.$file ] && continue
24 echo "Apply $file..."
25 patch -p1 < $WOK/$SOURCE/stuff/$SOURCE-$VERSION-$file || return 1
26 touch done.$file
27 done <<EOT
28 cpio-mkdir.u
29 tar.u
30 stat.u
31 ris.u
32 depmod.u
33 zmodules.u
34 usage.u
35 EOT
36 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config
37 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .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 crash)
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 cp -a stuff/etc $fs
55 mkdir -p $fs/etc/init.d
56 # Busybox config files.
57 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
58 busybox_stuff=$WOK/$SOURCE/stuff
59 cp $busybox_stuff/busybox.conf $fs/etc
60 chmod 600 $fs/etc/busybox.conf
61 cp $busybox_stuff/dnsd.conf $fs/etc
62 cp $busybox_stuff/udhcpd.conf $fs/etc
63 touch $fs/etc/resolv.conf
64 cp $busybox_stuff/inetd.conf $fs/etc
65 cp $busybox_stuff/daemon $fs/etc/init.d
66 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
67 udhcpd zcip ; do
68 grep -qi config_$i=y $src/.config &&
69 ln -s daemon $fs/etc/init.d/$i
70 done
71 cp $busybox_stuff/init $fs
72 rm $fs/linuxrc
73 mkdir -p $fs/etc/modprobe.d
74 # Udhcpc stuff.
75 mkdir -p $fs/usr/share/udhcpc
76 cp $busybox_stuff/udhcp.script $fs/usr/share/udhcpc/default.script
77 chmod +x $fs/usr/share/udhcpc/default.script
78 # ZeroConf stuff.
79 cp $busybox_stuff/zcip.script $fs/etc
80 # Httpd stuff.
81 cp $busybox_stuff/httpd_helper.sh $fs/usr/bin
82 chmod +x $fs/usr/bin/httpd_helper.sh
83 # .desktop stuff
84 mkdir -p $fs/usr/share
85 cp -a $busybox_stuff/applications $fs/usr/share
86 }
88 # Force glibc-2.7 reinstall if 2.3.6 still in use.
89 pre_install()
90 {
91 local i
92 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
93 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
94 tazpkg get-install glibc-base --forced
95 fi
96 answer=""
97 for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
98 [ -f $1$i ] || continue
99 case "$i" in
100 /bin/busybox) continue ;;
101 *bin/*) ;;
102 *) continue ;;
103 esac
104 if [ -z "$answer" ]; then
105 echo -n "Keep installed GNU utilities ? "
106 read -t 30 answer # by default: keep
107 case "$answer" in
108 n*|N*) break;;
109 *) answer="Y";;
110 esac
111 fi
112 cp -a $1$i $1$i-busybox-install
113 done
114 }
116 post_install()
117 {
118 local i
119 [ -f /etc/resolv.conf-busybox-install ] &&
120 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
121 while read i ; do
122 [ -f $1$i-busybox-install ] || continue
123 mv $1$i-busybox-install $1$i
124 done < $1$INSTALLED/$PACKAGE/files.list
125 chmod 4755 $1/bin/busybox
126 sed -i "s@vcsa2txt.*\$@busybox conspy -d | sed 's/ *\$//;/^\$/d;/^Processi\\\\|^.witchi/,\$!d' > /var/log/boot.log@" $1/etc/init.d/rcS
127 }