wok annotate smbwebclient/receipt @ rev 10302

Add: cross-arm-binutils and cross-arm-gcc for testing purpose (see doc:cookbook:cross)
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 22 01:31:33 2011 +0200 (2011-05-22)
parents f5b04145b323
children 3b4e4318134e
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"
slaxemulator@9422 8 TARBALL="$PACKAGE-$VERSION.php.gz"
pascal@1247 9 WEB_SITE="http://$PACKAGE.sourceforge.net/"
pascal@1247 10 DEPENDS="php smbclient"
slaxemulator@9422 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@1247 12 CONFIG_FILES="/etc/samba/smbwebclient.conf"
slaxemulator@9422 13 COOK_OPT="!unpack !repack_src"
pascal@1247 14
pascal@1247 15 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1247 16 genpkg_rules()
pascal@1247 17 {
slaxemulator@9422 18 if [ ! -d $src ]; then
slaxemulator@9422 19 mkdir -p $src
slaxemulator@9422 20 cp $SOURCES_REPOSITORY/$TARBALL $src
slaxemulator@9422 21 gunzip $src/$TARBALL
slaxemulator@9422 22 fi
slaxemulator@9422 23
pascal@1247 24 mkdir -p $fs/usr/share/samba $fs/etc/samba
pascal@1247 25 cp -a $src/. $fs/usr/share/samba
slaxemulator@9422 26 cp -a $stuff/* $fs
pascal@1247 27 }
pascal@1247 28
pascal@1247 29 post_install()
pascal@1247 30 {
pascal@1247 31 if [ -f $1/etc/locale.conf ]; then
pascal@1247 32 lang=$(. /etc/locale.conf; echo ${LANG%_*})
pascal@1247 33 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
pascal@1247 34 $1/etc/samba/smbwebclient.conf
pascal@1247 35 fi
pascal@1247 36
pascal@1247 37 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
pascal@1247 38 if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then
pascal@1247 39 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 40 if [ -z "$1" ]; then
pascal@1247 41 # Start Web server.
pascal@1247 42 /etc/init.d/lighttpd stop
pascal@1247 43 /etc/init.d/lighttpd start
pascal@1247 44 fi
pascal@1247 45 fi
pascal@1247 46 fi
pascal@1427 47 # Configure apache server
pascal@1427 48 if [ -f $1/etc/apache/httpd.conf ]; then
pascal@1427 49 if [ ! -f $1/etc/apache/conf.d/smbwebclient ]; then
pascal@1427 50 cat > $1/etc/apache/conf.d/smbwebclient <<EOT
pascal@1427 51 <IfModule mod_alias.c>
pascal@1427 52 Alias /smbwebclient /usr/share/samba
pascal@1427 53 </IfModule>
pascal@1427 54 <DirectoryMatch /usr/share/samba/>
pascal@1427 55 DirectoryIndex index.php
pascal@1427 56 Options +FollowSymLinks
pascal@1427 57 AllowOverride None
pascal@1427 58 Order allow,deny
pascal@1427 59 Allow from all
pascal@1427 60 </DirectoryMatch>
pascal@1427 61 EOT
pascal@1427 62 if [ -z "$1" ]; then
pascal@1427 63 # Start Web server.
pascal@1427 64 /etc/init.d/apache restart
pascal@1427 65 fi
pascal@1427 66 fi
pascal@1427 67 fi
pascal@1247 68 cat <<EOF
pascal@1247 69 ---
pascal@1247 70 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
pascal@1247 71 ---
pascal@1247 72 EOF
pascal@1247 73 }