wok view busybox-pam/receipt @ rev 5773

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