wok annotate smbwebclient/receipt @ rev 2195

Add busybox-pam
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 09 12:28:12 2009 +0000 (2009-02-09)
parents e663d0a50e66
children f5b04145b323
rev   line source
pascal@1247 1 # SliTaz package receipt.
pascal@1247 2
pascal@1247 3 PACKAGE="smbwebclient"
pascal@1247 4 VERSION="2.9"
pascal@1247 5 CATEGORY="network"
pascal@1247 6 SHORT_DESC="Samba client over the Web."
pascal@1247 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@1247 8 WEB_SITE="http://$PACKAGE.sourceforge.net/"
pascal@1247 9 DEPENDS="php smbclient"
pascal@1247 10 CONFIG_FILES="/etc/samba/smbwebclient.conf"
pascal@1247 11
pascal@1247 12 # Rules to configure and make the package.
pascal@1247 13 compile_rules()
pascal@1247 14 {
pascal@1247 15 if [ ! -d $src ]; then
pascal@1544 16 wget $SF_MIRROR/$PACKAGE/$PACKAGE-$VERSION.php.gz || return 1
pascal@1247 17 mkdir -p $src
pascal@1247 18 mv $PACKAGE-$VERSION.php.gz $src
pascal@1247 19 gunzip $src/$PACKAGE-$VERSION.php.gz
pascal@1247 20 fi
pascal@1247 21 }
pascal@1247 22
pascal@1247 23 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1247 24 genpkg_rules()
pascal@1247 25 {
pascal@1247 26 mkdir -p $fs/usr/share/samba $fs/etc/samba
pascal@1247 27 cp -a $src/. $fs/usr/share/samba
pascal@1247 28 cp -a stuff/* $fs
pascal@1247 29 }
pascal@1247 30
pascal@1247 31 post_install()
pascal@1247 32 {
pascal@1247 33 if [ -f $1/etc/locale.conf ]; then
pascal@1247 34 lang=$(. /etc/locale.conf; echo ${LANG%_*})
pascal@1247 35 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
pascal@1247 36 $1/etc/samba/smbwebclient.conf
pascal@1247 37 fi
pascal@1247 38
pascal@1247 39 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
pascal@1247 40 if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then
pascal@1247 41 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf
pascal@1247 42 if [ -z "$1" ]; then
pascal@1247 43 # Start Web server.
pascal@1247 44 /etc/init.d/lighttpd stop
pascal@1247 45 /etc/init.d/lighttpd start
pascal@1247 46 fi
pascal@1247 47 fi
pascal@1247 48 fi
pascal@1427 49 # Configure apache server
pascal@1427 50 if [ -f $1/etc/apache/httpd.conf ]; then
pascal@1427 51 if [ ! -f $1/etc/apache/conf.d/smbwebclient ]; then
pascal@1427 52 cat > $1/etc/apache/conf.d/smbwebclient <<EOT
pascal@1427 53 <IfModule mod_alias.c>
pascal@1427 54 Alias /smbwebclient /usr/share/samba
pascal@1427 55 </IfModule>
pascal@1427 56 <DirectoryMatch /usr/share/samba/>
pascal@1427 57 DirectoryIndex index.php
pascal@1427 58 Options +FollowSymLinks
pascal@1427 59 AllowOverride None
pascal@1427 60 Order allow,deny
pascal@1427 61 Allow from all
pascal@1427 62 </DirectoryMatch>
pascal@1427 63 EOT
pascal@1427 64 if [ -z "$1" ]; then
pascal@1427 65 # Start Web server.
pascal@1427 66 /etc/init.d/apache restart
pascal@1427 67 fi
pascal@1427 68 fi
pascal@1427 69 fi
pascal@1247 70 cat <<EOF
pascal@1247 71 ---
pascal@1247 72 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
pascal@1247 73 ---
pascal@1247 74 EOF
pascal@1247 75 }