wok-6.x view busybox-pam/receipt @ rev 5921
busybox-pam: update CONFIG_FILES
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jul 28 12:53:19 2010 +0200 (2010-07-28) |
parents | 51ee2dc8ea91 |
children | c29991cef110 |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox-pam"
4 VERSION="1.17.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 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 # "CFLAGS=-O0" is a workaround for GCC 4.5.0
40 make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
41 echo "Chmod 4755 on busybox binary..."
42 chmod 4755 _install/bin/busybox
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 cp -a $src/_install/* $fs
49 rm -f $fs/sbin/depmod $fs/usr/bin/ar
50 cp -a stuff/etc $fs
51 mkdir -p $fs/etc/init.d
52 # Busybox config files.
53 # genpkg busybox-pam depends on busybox config files
54 # Note: no space/tab before WANTED
55 WANTED="busybox"
56 cd $WOK/$SOURCE
57 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
58 cp stuff/busybox.conf $fs/etc
59 chmod 600 $fs/etc/busybox.conf
60 cp stuff/dnsd.conf $fs/etc
61 cp stuff/udhcpd.conf $fs/etc
62 touch $fs/etc/resolv.conf
63 cp stuff/inetd.conf $fs/etc
64 cp stuff/daemon $fs/etc/init.d
65 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
66 udhcpd zcip ; do
67 grep -qi config_$i=y $src/.config &&
68 ln -s daemon $fs/etc/init.d/$i
69 done
70 cp stuff/init $fs
71 rm $fs/linuxrc
72 mkdir -p $fs/etc/modprobe.d
73 # Udhcpc stuff.
74 mkdir -p $fs/usr/share/udhcpc
75 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
76 chmod +x $fs/usr/share/udhcpc/default.script
77 # ZeroConf stuff.
78 cp stuff/zcip.script $fs/etc
79 # Httpd stuff.
80 cp stuff/httpd_helper.sh $fs/usr/bin
81 chmod +x $fs/usr/bin/httpd_helper.sh
82 # .desktop stuff
83 mkdir -p $fs/usr/share
84 cp -a stuff/applications $fs/usr/share
85 }
87 # Force glibc-2.7 reinstall if 2.3.6 still in use.
88 pre_install()
89 {
90 local i
91 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
92 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
93 tazpkg get-install glibc-base --forced
94 fi
95 answer=""
96 while read i ; do
97 [ -f $1$i ] || continue
98 case "$i" in
99 /bin/busybox) continue ;;
100 *bin/*) ;;
101 *) continue ;;
102 esac
103 if [ -z "$answer" ]; then
104 echo -n "Keep installed GNU utilities ? "
105 read answer
106 case "$answer" in
107 y*|Y*|o*|O*);;
108 *) break;;
109 esac
110 fi
111 cp -a $1$i $1$i-busybox-install
112 done < $1$INSTALLED/$PACKAGE/files.list
113 }
115 post_install()
116 {
117 local i
118 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
119 while read i ; do
120 [ -f $1$i-busybox-install ] || continue
121 mv $1$i-busybox-install $1$i
122 done < $1$INSTALLED/$PACKAGE/files.list
123 chmod 4755 $1/bin/busybox
124 }