wok view busybox-pam/receipt @ rev 3000

slim: Fix pre_install func to backup config file (Thanks firmit)
author Christophe Lincoln <pankso@slitaz.org>
date Mon May 11 21:44:31 2009 +0200 (2009-05-11)
parents c5a5fdb28e98
children c29319d0340a
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/busybox/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 EOT
40 cp $WOK/busybox/stuff/$SOURCE-$VERSION.config .config
41 sed -i 's/# CONFIG_PAM is not set/CONFIG_PAM=y/' .config
42 make oldconfig
43 make && make 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
53 cp -a stuff/etc $fs
54 mkdir -p $fs/etc/init.d
55 # Busybox config files.
56 cd $WOK/busybox
57 fs=$WOK/$PACKAGE/taz/$PACKAGE-$VERSION/fs
58 cp stuff/busybox.conf $fs/etc
59 chmod 600 $fs/etc/busybox.conf
60 cp stuff/dnsd.conf $fs/etc
61 cp stuff/udhcpd.conf $fs/etc
62 touch $fs/etc/resolv.conf
63 cp stuff/inetd.conf $fs/etc
64 cp stuff/dnsd $fs/etc/init.d
65 cp stuff/udhcpd $fs/etc/init.d
66 cp stuff/inetd $fs/etc/init.d
67 cp stuff/zcip $fs/etc/init.d
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 \
74 $fs/usr/share/udhcpc/default.script
75 chmod +x $fs/usr/share/udhcpc/default.script
76 # ZeroConf stuff.
77 cp stuff/zcip.script $fs/etc
78 # .desktop stuff
79 mkdir -p $fs/usr/share
80 cp -a stuff/applications $fs/usr/share
81 }
83 # Force glibc-2.7 reinstall if 2.3.6 still in use.
84 pre_install()
85 {
86 cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
87 if grep -q 'VERSION="2.3.6"' /var/lib/tazpkg/installed/glibc-base/receipt; then
88 tazpkg get-install glibc-base --forced
89 fi
90 }
92 post_install()
93 {
94 mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
95 }