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