wok-next annotate smbwebclient/receipt @ rev 21025

Update tzdata (2018g)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Nov 03 04:10:29 2018 +0200 (2018-11-03)
parents d43bf7aae921
children
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"
al@21020 6 SHORT_DESC="Samba client over the Web"
pascal@1247 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15593 8 LICENSE="GPL2"
al@21020 9 WEB_SITE="http://smbwebclient.sourceforge.net/"
al@21020 10
slaxemulator@9422 11 TARBALL="$PACKAGE-$VERSION.php.gz"
slaxemulator@9422 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@1247 13
al@21020 14 genpkg_rules() {
slaxemulator@9422 15 if [ ! -d $src ]; then
slaxemulator@9422 16 mkdir -p $src
al@20513 17 cp $SRC/$TARBALL $src
slaxemulator@9422 18 gunzip $src/$TARBALL
slaxemulator@9422 19 fi
slaxemulator@9422 20
pascal@1247 21 mkdir -p $fs/usr/share/samba $fs/etc/samba
pascal@1247 22 cp -a $src/. $fs/usr/share/samba
slaxemulator@9422 23 cp -a $stuff/* $fs
al@21020 24 DEPENDS="php smbclient"
al@21020 25 CONFIG_FILES="/etc/samba/smbwebclient.conf"
pascal@1247 26 }
pascal@1247 27
al@21020 28 post_install() {
pascal@18730 29 if [ -f "$1/etc/locale.conf" ]; then
pascal@18730 30 lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*})
pascal@1247 31 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
pascal@18730 32 "$1/etc/samba/smbwebclient.conf"
pascal@1247 33 fi
al@21020 34
pascal@18730 35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 36 if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then
al@21020 37 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 38 if [ -z "$1" ]; then
pascal@1247 39 # Start Web server.
pascal@1247 40 /etc/init.d/lighttpd stop
pascal@1247 41 /etc/init.d/lighttpd start
pascal@1247 42 fi
pascal@1247 43 fi
pascal@1247 44 fi
al@21020 45
pascal@1427 46 # Configure apache server
pascal@18730 47 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 48 if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then
pascal@18730 49 cat > "$1/etc/apache/conf.d/smbwebclient" <<EOT
pascal@1427 50 <IfModule mod_alias.c>
pascal@1427 51 Alias /smbwebclient /usr/share/samba
pascal@1427 52 </IfModule>
pascal@1427 53 <DirectoryMatch /usr/share/samba/>
pascal@1427 54 DirectoryIndex index.php
pascal@1427 55 Options +FollowSymLinks
pascal@1427 56 AllowOverride None
pascal@1427 57 Order allow,deny
pascal@1427 58 Allow from all
pascal@1427 59 </DirectoryMatch>
pascal@1427 60 EOT
pascal@1427 61 if [ -z "$1" ]; then
pascal@1427 62 # Start Web server.
pascal@1427 63 /etc/init.d/apache restart
pascal@1427 64 fi
pascal@1427 65 fi
pascal@1427 66 fi
al@21020 67
al@21020 68 [- n "$quiet" ] || cat <<"EOF"
al@21020 69
al@21020 70 .-----------------------------------------------.
al@21020 71 | Check $cfgDefaultServer in configuration file |
al@21020 72 | /etc/samba/smbwebclient.conf |
al@21020 73 '-----------------------------------------------'
pascal@1247 74 EOF
pascal@1247 75 }