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