wok view busybox-pam/receipt @ rev 5684

Up busybox (1.16.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jun 04 17:00:07 2010 +0200 (2010-06-04)
parents 94d647af395f
children 52dc580d9edb
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox-pam"
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 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 PROVIDE="busybox:pam"
17 # Rules to configure and make the package.
18 compile_rules()
19 {
20 cd $src
21 while read file; do
22 [ -f done.$file ] && continue
23 echo "Apply $file..."
24 patch -p1 < $WOK/$SOURCE/stuff/$SOURCE-$VERSION-$file || return 1
25 touch done.$file
26 done <<EOT
27 vcsa2txt.u
28 ftpd.u
29 cpio-mkdir.u
30 tar.u
31 stat.u
32 ris.u
33 dpkg_deb.u
34 syslogd.u
35 modinfo.u
36 zmodules.u
37 EOT
38 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config
39 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
40 make oldconfig
41 # "CFLAGS=-O0" is a workaround for GCC 4.5.0
42 make "CFLAGS=-O0" && make "CFLAGS=-O0" 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 $fs/usr/bin/ar
52 cp -a stuff/etc $fs
53 mkdir -p $fs/etc/init.d
54 # Busybox config files.
55 # genpkg busybox-pam depends on busybox config files
56 # Note: no space/tab before WANTED
57 WANTED="busybox"
58 cd $WOK/$SOURCE
59 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
60 cp stuff/busybox.conf $fs/etc
61 chmod 600 $fs/etc/busybox.conf
62 cp stuff/dnsd.conf $fs/etc
63 cp stuff/udhcpd.conf $fs/etc
64 touch $fs/etc/resolv.conf
65 cp stuff/inetd.conf $fs/etc
66 cp stuff/daemon $fs/etc/init.d
67 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
68 udhcpd zcip ; do
69 grep -qi config_$i=y $src/.config &&
70 ln -s daemon $fs/etc/init.d/$i
71 done
72 cp stuff/init $fs
73 rm $fs/linuxrc
74 mkdir -p $fs/etc/modprobe.d
75 # Udhcpc stuff.
76 mkdir -p $fs/usr/share/udhcpc
77 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
78 chmod +x $fs/usr/share/udhcpc/default.script
79 # ZeroConf stuff.
80 cp stuff/zcip.script $fs/etc
81 # Httpd stuff.
82 cp stuff/httpd_helper.sh $fs/usr/bin
83 chmod +x $fs/usr/bin/httpd_helper.sh
84 # .desktop stuff
85 mkdir -p $fs/usr/share
86 cp -a stuff/applications $fs/usr/share
87 }
89 # Force glibc-2.7 reinstall if 2.3.6 still in use.
90 pre_install()
91 {
92 local i
93 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
94 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
95 tazpkg get-install glibc-base --forced
96 fi
97 answer=""
98 while read i ; do
99 [ -e $ROOT$i ] || continue
100 if [ -z "$answer" ]; then
101 echo -n "Keep installed GNU utilities ? "
102 read answer
103 case "$answer" in
104 y*|Y*|o*|O*);;
105 *) break;;
106 esac
107 fi
108 mv $ROOT$i $ROOT$i-busybox-install
109 done < $1$INSTALLED/$PACKAGE/files.list
110 }
112 post_install()
113 {
114 local i
115 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
116 while read i ; do
117 [ -e $ROOT$i-busybox-install ] || continue
118 mv $ROOT$i-busybox-install $ROOT$i
119 done < $1$INSTALLED/$PACKAGE/files.list
120 }