wok-6.x view smbwebclient/receipt @ rev 1247
Add smbwebclient
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Aug 12 14:54:18 2008 +0000 (2008-08-12) |
parents | |
children | 5fe0d4cca0be |
line source
1 # SliTaz package receipt.
3 PACKAGE="smbwebclient"
4 VERSION="2.9"
5 CATEGORY="network"
6 SHORT_DESC="Samba client over the Web."
7 MAINTAINER="pascal.bellard@slitaz.org"
8 WEB_SITE="http://$PACKAGE.sourceforge.net/"
9 DEPENDS="php smbclient"
10 CONFIG_FILES="/etc/samba/smbwebclient.conf"
12 # Rules to configure and make the package.
13 compile_rules()
14 {
15 if [ ! -d $src ]; then
16 mkdir -p $src
17 wget $SF_MIRROR/$PACKAGE/$PACKAGE-$VERSION.php.gz
18 mv $PACKAGE-$VERSION.php.gz $src
19 gunzip $src/$PACKAGE-$VERSION.php.gz
20 fi
21 }
23 # Rules to gen a SliTaz package suitable for Tazpkg.
24 genpkg_rules()
25 {
26 mkdir -p $fs/usr/share/samba $fs/etc/samba
27 cp -a $src/. $fs/usr/share/samba
28 cp -a stuff/* $fs
29 }
31 post_install()
32 {
33 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \
34 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT
35 etc/samba/smbwebclient.conf
36 EOT
37 if [ -f $1/etc/locale.conf ]; then
38 lang=$(. /etc/locale.conf; echo ${LANG%_*})
39 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
40 $1/etc/samba/smbwebclient.conf
41 fi
43 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
44 if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then
45 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf
46 if [ -z "$1" ]; then
47 # Start Web server.
48 /etc/init.d/lighttpd stop
49 /etc/init.d/lighttpd start
50 fi
51 fi
52 fi
53 cat <<EOF
54 ---
55 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
56 ---
57 EOF
58 }
60 repack_cleanup()
61 {
62 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id )
63 }