wok view busybox-pam/receipt @ rev 5953

Up: exiftool 8.27
author Antoine Bodin <gokhlayeh@mailoo.org>
date Tue Aug 03 22:23:30 2010 +0200 (2010-08-03)
parents 4421c2206be7
children 75dd5efa3105
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 if [ "$(gcc --version | awk '{ print $3; exit }')" == "4.5.0" ]; then
39 # "CFLAGS=-O0" is a workaround for GCC 4.5.0 (sed crash)
40 # "CFLAGS=-fno-tree-pta" may be a workaround for GCC 4.5.0 (sed garbage)
41 make -j 4 "CFLAGS=-O0" && make "CFLAGS=-O0" install
42 else
43 make -j 4 && make install
44 fi
45 echo "Chmod 4755 on busybox binary..."
46 chmod 4755 _install/bin/busybox
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 cp -a $src/_install/* $fs
53 rm -f $fs/sbin/depmod $fs/usr/bin/ar
54 cp -a stuff/etc $fs
55 mkdir -p $fs/etc/init.d
56 # Busybox config files.
57 # genpkg busybox-pam depends on busybox config files
58 # Note: no space/tab before WANTED
59 WANTED="busybox"
60 cd $WOK/$SOURCE
61 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
62 cp stuff/busybox.conf $fs/etc
63 chmod 600 $fs/etc/busybox.conf
64 cp stuff/dnsd.conf $fs/etc
65 cp stuff/udhcpd.conf $fs/etc
66 touch $fs/etc/resolv.conf
67 cp stuff/inetd.conf $fs/etc
68 cp stuff/daemon $fs/etc/init.d
69 for i in crond dnsd ftpd httpd inetd klogd ntpd syslogd telnetd tftpd \
70 udhcpd zcip ; do
71 grep -qi config_$i=y $src/.config &&
72 ln -s daemon $fs/etc/init.d/$i
73 done
74 cp stuff/init $fs
75 rm $fs/linuxrc
76 mkdir -p $fs/etc/modprobe.d
77 # Udhcpc stuff.
78 mkdir -p $fs/usr/share/udhcpc
79 cp stuff/udhcp.script $fs/usr/share/udhcpc/default.script
80 chmod +x $fs/usr/share/udhcpc/default.script
81 # ZeroConf stuff.
82 cp stuff/zcip.script $fs/etc
83 # Httpd stuff.
84 cp stuff/httpd_helper.sh $fs/usr/bin
85 chmod +x $fs/usr/bin/httpd_helper.sh
86 # .desktop stuff
87 mkdir -p $fs/usr/share
88 cp -a stuff/applications $fs/usr/share
89 }
91 # Force glibc-2.7 reinstall if 2.3.6 still in use.
92 pre_install()
93 {
94 local i
95 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
96 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
97 tazpkg get-install glibc-base --forced
98 fi
99 answer=""
100 for i in $(cat $1$INSTALLED/$PACKAGE/files.list); do
101 [ -f $1$i ] || continue
102 case "$i" in
103 /bin/busybox) continue ;;
104 *bin/*) ;;
105 *) continue ;;
106 esac
107 if [ -z "$answer" ]; then
108 echo -n "Keep installed GNU utilities ? "
109 read answer
110 case "$answer" in
111 y*|Y*|o*|O*);;
112 *) break;;
113 esac
114 fi
115 cp -a $1$i $1$i-busybox-install
116 done
117 }
119 post_install()
120 {
121 local i
122 [ -f /etc/resolv.conf-busybox-install ] &&
123 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
124 while read i ; do
125 [ -f $1$i-busybox-install ] || continue
126 mv $1$i-busybox-install $1$i
127 done < $1$INSTALLED/$PACKAGE/files.list
128 chmod 4755 $1/bin/busybox
129 }