wok annotate smbwebclient/receipt @ rev 25382

updated unison (2.51.5 -> 2.52.1)
author Hans-G?nter Theisgen
date Sat Jul 30 17:15:58 2022 +0100 (2022-07-30)
parents 70a88c677f40
children ad0bc3efbf37
rev   line source
pascal@1247 1 # SliTaz package receipt.
pascal@1247 2
pascal@1247 3 PACKAGE="smbwebclient"
Hans-G?nter@21924 4 VERSION="2.9.1"
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"
Hans-G?nter@21924 9 WEB_SITE="https://sourceforge.net/projects/smbwebclient/"
Hans-G?nter@21924 10
slaxemulator@9422 11 TARBALL="$PACKAGE-$VERSION.php.gz"
slaxemulator@9422 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@1247 13
pascal@15593 14 DEPENDS="php smbclient"
pascal@15593 15
Hans-G?nter@21924 16 CONFIG_FILES="/etc/samba/smbwebclient.conf"
Hans-G?nter@21924 17
Hans-G?nter@21924 18 HOST_ARCH="any"
Hans-G?nter@21924 19
pascal@24313 20 # What is the latest version available today?
pascal@24313 21 current_version()
pascal@24313 22 {
pascal@24313 23 wget -O - https://sourceforge.net/projects/$PACKAGE/files/ 2>/dev/null | \
pascal@24313 24 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
pascal@24313 25 sed "/$PACKAGE-/!d;s|.*$PACKAGE-||;s|.php.*||;s|_|.|g;q"
pascal@24313 26 }
pascal@24313 27
pascal@1247 28 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1247 29 genpkg_rules()
pascal@1247 30 {
slaxemulator@9422 31 if [ ! -d $src ]; then
slaxemulator@9422 32 mkdir -p $src
slaxemulator@9422 33 cp $SOURCES_REPOSITORY/$TARBALL $src
slaxemulator@9422 34 gunzip $src/$TARBALL
slaxemulator@9422 35 fi
slaxemulator@9422 36
pascal@1247 37 mkdir -p $fs/usr/share/samba $fs/etc/samba
pascal@1247 38 cp -a $src/. $fs/usr/share/samba
slaxemulator@9422 39 cp -a $stuff/* $fs
pascal@1247 40 }
pascal@1247 41
pascal@1247 42 post_install()
pascal@1247 43 {
pascal@18730 44 if [ -f "$1/etc/locale.conf" ]; then
pascal@18730 45 lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*})
pascal@1247 46 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
pascal@18730 47 "$1/etc/samba/smbwebclient.conf"
pascal@1247 48 fi
pascal@1247 49
pascal@18730 50 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 51 if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 52 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 53 if [ -z "$1" ]; then
pascal@1247 54 # Start Web server.
pascal@1247 55 /etc/init.d/lighttpd stop
pascal@1247 56 /etc/init.d/lighttpd start
pascal@1247 57 fi
pascal@1247 58 fi
pascal@1247 59 fi
pascal@1427 60 # Configure apache server
pascal@18730 61 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 62 if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then
pascal@18730 63 cat > "$1/etc/apache/conf.d/smbwebclient" <<EOT
pascal@1427 64 <IfModule mod_alias.c>
pascal@1427 65 Alias /smbwebclient /usr/share/samba
pascal@1427 66 </IfModule>
pascal@1427 67 <DirectoryMatch /usr/share/samba/>
pascal@1427 68 DirectoryIndex index.php
pascal@1427 69 Options +FollowSymLinks
pascal@1427 70 AllowOverride None
pascal@1427 71 Order allow,deny
pascal@1427 72 Allow from all
pascal@1427 73 </DirectoryMatch>
pascal@1427 74 EOT
pascal@1427 75 if [ -z "$1" ]; then
pascal@1427 76 # Start Web server.
pascal@1427 77 /etc/init.d/apache restart
pascal@1427 78 fi
pascal@1427 79 fi
pascal@1427 80 fi
pascal@1247 81 cat <<EOF
pascal@1247 82 ---
pascal@1247 83 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
pascal@1247 84 ---
pascal@1247 85 EOF
pascal@1247 86 }