wok-6.x view smbwebclient/receipt @ rev 2940
Up: libgcrypt-* (1.4.4)
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri May 08 00:13:03 2009 +0200 (2009-05-08) |
parents | e663d0a50e66 |
children | f5b04145b323 |
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 wget $SF_MIRROR/$PACKAGE/$PACKAGE-$VERSION.php.gz || return 1
17 mkdir -p $src
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 if [ -f $1/etc/locale.conf ]; then
34 lang=$(. /etc/locale.conf; echo ${LANG%_*})
35 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
36 $1/etc/samba/smbwebclient.conf
37 fi
39 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
40 if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then
41 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf
42 if [ -z "$1" ]; then
43 # Start Web server.
44 /etc/init.d/lighttpd stop
45 /etc/init.d/lighttpd start
46 fi
47 fi
48 fi
49 # Configure apache server
50 if [ -f $1/etc/apache/httpd.conf ]; then
51 if [ ! -f $1/etc/apache/conf.d/smbwebclient ]; then
52 cat > $1/etc/apache/conf.d/smbwebclient <<EOT
53 <IfModule mod_alias.c>
54 Alias /smbwebclient /usr/share/samba
55 </IfModule>
56 <DirectoryMatch /usr/share/samba/>
57 DirectoryIndex index.php
58 Options +FollowSymLinks
59 AllowOverride None
60 Order allow,deny
61 Allow from all
62 </DirectoryMatch>
63 EOT
64 if [ -z "$1" ]; then
65 # Start Web server.
66 /etc/init.d/apache restart
67 fi
68 fi
69 fi
70 cat <<EOF
71 ---
72 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
73 ---
74 EOF
75 }