wok-next view busybox-pam/receipt @ rev 5329
mv get-msttcorefonts to wok-undigest; please add new pkgs to wok-undigest first
author | Rohit Joshi <jozee@slitaz.org> |
---|---|
date | Fri Apr 23 06:15:11 2010 -0400 (2010-04-23) |
parents | 02779417eb2b |
children | 2a5e098a34ac |
line source
1 # SliTaz package receipt.
3 PACKAGE="busybox-pam"
4 VERSION="1.12.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 vcsa2txt.u
28 dhcpc.u
29 cpio-mkdir.u
30 tar.u
31 stat.u
32 zmodules.u
33 modinfo.u
34 modprobe.u
35 paths.u
36 mkswap.u
37 install.u
38 basename.u
39 unlzma.u
40 replay.u
41 ris.u
42 dpkg_deb.u
43 ionice.u
44 syslogd.u
45 iptunnel.u
46 rpm2cpio.u
47 EOT
48 cp $WOK/$SOURCE/stuff/$SOURCE-$VERSION.config .config
49 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
50 make oldconfig
51 make && make install
52 echo "Chmod 4755 on busybox binary..."
53 chmod 4755 _install/bin/busybox
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 cp -a $src/_install/* $fs
60 rm -f $fs/sbin/depmod $fs/usr/bin/ar
61 cp -a stuff/etc $fs
62 mkdir -p $fs/etc/init.d
63 # Busybox config files.
64 # genpkg busybox-pam depends on busybox config files
65 # Note: no space/tab before WANTED
66 WANTED="busybox"
67 cd $WOK/$SOURCE
68 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
69 cp stuff/busybox.conf $fs/etc
70 chmod 600 $fs/etc/busybox.conf
71 cp stuff/dnsd.conf $fs/etc
72 cp stuff/udhcpd.conf $fs/etc
73 touch $fs/etc/resolv.conf
74 cp stuff/inetd.conf $fs/etc
75 cp stuff/dnsd $fs/etc/init.d
76 cp stuff/udhcpd $fs/etc/init.d
77 cp stuff/inetd $fs/etc/init.d
78 cp stuff/zcip $fs/etc/init.d
79 cp stuff/init $fs
80 rm $fs/linuxrc
81 mkdir -p $fs/etc/modprobe.d
82 # Udhcpc stuff.
83 mkdir -p $fs/usr/share/udhcpc
84 cp stuff/udhcp.script \
85 $fs/usr/share/udhcpc/default.script
86 chmod +x $fs/usr/share/udhcpc/default.script
87 # ZeroConf stuff.
88 cp stuff/zcip.script $fs/etc
89 # .desktop stuff
90 mkdir -p $fs/usr/share
91 cp -a stuff/applications $fs/usr/share
92 }
94 # Force glibc-2.7 reinstall if 2.3.6 still in use.
95 pre_install()
96 {
97 local i
98 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
99 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
100 tazpkg get-install glibc-base --forced
101 fi
102 answer=""
103 while read i ; do
104 [ -e $ROOT$i ] || continue
105 if [ -z "$answer" ]; then
106 echo -n "Keep installed GNU utilities ? "
107 read answer
108 case "$answer" in
109 y*|Y*|o*|O*);;
110 *) break;;
111 esac
112 fi
113 mv $ROOT$i $ROOT$i-busybox-install
114 done < $1$INSTALLED/$PACKAGE/files.list
115 }
117 post_install()
118 {
119 local i
120 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
121 while read i ; do
122 [ -e $ROOT$i-busybox-install ] || continue
123 mv $ROOT$i-busybox-install $ROOT$i
124 done < $1$INSTALLED/$PACKAGE/files.list
125 }