wok-6.x view busybox-pam/receipt @ rev 5760

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