wok-next view smbwebclient/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents d43bf7aae921
children
line source
1 # SliTaz package receipt.
3 PACKAGE="smbwebclient"
4 VERSION="2.9"
5 CATEGORY="network"
6 SHORT_DESC="Samba client over the Web"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://smbwebclient.sourceforge.net/"
11 TARBALL="$PACKAGE-$VERSION.php.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 genpkg_rules() {
15 if [ ! -d $src ]; then
16 mkdir -p $src
17 cp $SRC/$TARBALL $src
18 gunzip $src/$TARBALL
19 fi
21 mkdir -p $fs/usr/share/samba $fs/etc/samba
22 cp -a $src/. $fs/usr/share/samba
23 cp -a $stuff/* $fs
24 DEPENDS="php smbclient"
25 CONFIG_FILES="/etc/samba/smbwebclient.conf"
26 }
28 post_install() {
29 if [ -f "$1/etc/locale.conf" ]; then
30 lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*})
31 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
32 "$1/etc/samba/smbwebclient.conf"
33 fi
35 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
36 if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then
37 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
38 if [ -z "$1" ]; then
39 # Start Web server.
40 /etc/init.d/lighttpd stop
41 /etc/init.d/lighttpd start
42 fi
43 fi
44 fi
46 # Configure apache server
47 if [ -f "$1/etc/apache/httpd.conf" ]; then
48 if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then
49 cat > "$1/etc/apache/conf.d/smbwebclient" <<EOT
50 <IfModule mod_alias.c>
51 Alias /smbwebclient /usr/share/samba
52 </IfModule>
53 <DirectoryMatch /usr/share/samba/>
54 DirectoryIndex index.php
55 Options +FollowSymLinks
56 AllowOverride None
57 Order allow,deny
58 Allow from all
59 </DirectoryMatch>
60 EOT
61 if [ -z "$1" ]; then
62 # Start Web server.
63 /etc/init.d/apache restart
64 fi
65 fi
66 fi
68 [- n "$quiet" ] || cat <<"EOF"
70 .-----------------------------------------------.
71 | Check $cfgDefaultServer in configuration file |
72 | /etc/samba/smbwebclient.conf |
73 '-----------------------------------------------'
74 EOF
75 }