wok-current annotate smbwebclient/receipt @ rev 24301
updated tea (50.0.4 -> 60.6.0)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Jan 15 17:06:30 2022 +0100 (2022-01-15) |
parents | 9e01bc6321ea |
children | 0c04fc34847a |
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@1247 | 20 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1247 | 21 genpkg_rules() |
pascal@1247 | 22 { |
slaxemulator@9422 | 23 if [ ! -d $src ]; then |
slaxemulator@9422 | 24 mkdir -p $src |
slaxemulator@9422 | 25 cp $SOURCES_REPOSITORY/$TARBALL $src |
slaxemulator@9422 | 26 gunzip $src/$TARBALL |
slaxemulator@9422 | 27 fi |
slaxemulator@9422 | 28 |
pascal@1247 | 29 mkdir -p $fs/usr/share/samba $fs/etc/samba |
pascal@1247 | 30 cp -a $src/. $fs/usr/share/samba |
slaxemulator@9422 | 31 cp -a $stuff/* $fs |
pascal@1247 | 32 } |
pascal@1247 | 33 |
pascal@1247 | 34 post_install() |
pascal@1247 | 35 { |
pascal@18730 | 36 if [ -f "$1/etc/locale.conf" ]; then |
pascal@18730 | 37 lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*}) |
pascal@1247 | 38 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \ |
pascal@18730 | 39 "$1/etc/samba/smbwebclient.conf" |
pascal@1247 | 40 fi |
pascal@1247 | 41 |
pascal@18730 | 42 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then |
pascal@18730 | 43 if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then |
pascal@18730 | 44 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 | 45 if [ -z "$1" ]; then |
pascal@1247 | 46 # Start Web server. |
pascal@1247 | 47 /etc/init.d/lighttpd stop |
pascal@1247 | 48 /etc/init.d/lighttpd start |
pascal@1247 | 49 fi |
pascal@1247 | 50 fi |
pascal@1247 | 51 fi |
pascal@1427 | 52 # Configure apache server |
pascal@18730 | 53 if [ -f "$1/etc/apache/httpd.conf" ]; then |
pascal@18730 | 54 if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then |
pascal@18730 | 55 cat > "$1/etc/apache/conf.d/smbwebclient" <<EOT |
pascal@1427 | 56 <IfModule mod_alias.c> |
pascal@1427 | 57 Alias /smbwebclient /usr/share/samba |
pascal@1427 | 58 </IfModule> |
pascal@1427 | 59 <DirectoryMatch /usr/share/samba/> |
pascal@1427 | 60 DirectoryIndex index.php |
pascal@1427 | 61 Options +FollowSymLinks |
pascal@1427 | 62 AllowOverride None |
pascal@1427 | 63 Order allow,deny |
pascal@1427 | 64 Allow from all |
pascal@1427 | 65 </DirectoryMatch> |
pascal@1427 | 66 EOT |
pascal@1427 | 67 if [ -z "$1" ]; then |
pascal@1427 | 68 # Start Web server. |
pascal@1427 | 69 /etc/init.d/apache restart |
pascal@1427 | 70 fi |
pascal@1427 | 71 fi |
pascal@1427 | 72 fi |
pascal@1247 | 73 cat <<EOF |
pascal@1247 | 74 --- |
pascal@1247 | 75 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf |
pascal@1247 | 76 --- |
pascal@1247 | 77 EOF |
pascal@1247 | 78 } |