wok-current annotate smbwebclient/receipt @ rev 20437

php-common: fix extension_dir in /etc/php.ini (thanks anggit)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 09 10:36:45 2018 +0200 (2018-09-09)
parents d51b2411e55e
children 70a88c677f40
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@15593 8 LICENSE="GPL2"
slaxemulator@9422 9 TARBALL="$PACKAGE-$VERSION.php.gz"
pascal@1247 10 WEB_SITE="http://$PACKAGE.sourceforge.net/"
slaxemulator@9422 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@1247 12 CONFIG_FILES="/etc/samba/smbwebclient.conf"
pascal@16264 13 HOST_ARCH="any"
pascal@1247 14
pascal@15593 15 DEPENDS="php smbclient"
pascal@15593 16
pascal@1247 17 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1247 18 genpkg_rules()
pascal@1247 19 {
slaxemulator@9422 20 if [ ! -d $src ]; then
slaxemulator@9422 21 mkdir -p $src
slaxemulator@9422 22 cp $SOURCES_REPOSITORY/$TARBALL $src
slaxemulator@9422 23 gunzip $src/$TARBALL
slaxemulator@9422 24 fi
slaxemulator@9422 25
pascal@1247 26 mkdir -p $fs/usr/share/samba $fs/etc/samba
pascal@1247 27 cp -a $src/. $fs/usr/share/samba
slaxemulator@9422 28 cp -a $stuff/* $fs
pascal@1247 29 }
pascal@1247 30
pascal@1247 31 post_install()
pascal@1247 32 {
pascal@18730 33 if [ -f "$1/etc/locale.conf" ]; then
pascal@18730 34 lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*})
pascal@1247 35 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
pascal@18730 36 "$1/etc/samba/smbwebclient.conf"
pascal@1247 37 fi
pascal@1247 38
pascal@18730 39 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 40 if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 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@18730 50 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 51 if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then
pascal@18730 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 }