wok-next view smbwebclient/receipt @ rev 20513

A lot of tiny edits; remove wget and pkg-build from $BUILD_DEPENDS and from *-dev packages $DEPENDS.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 21 15:58:17 2018 +0200 (2018-03-21)
parents c4e53a39395a
children d5aab818505e
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 TARBALL="$PACKAGE-$VERSION.php.gz"
10 WEB_SITE="http://$PACKAGE.sourceforge.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/samba/smbwebclient.conf"
14 DEPENDS="php smbclient"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 if [ ! -d $src ]; then
20 mkdir -p $src
21 cp $SRC/$TARBALL $src
22 gunzip $src/$TARBALL
23 fi
25 mkdir -p $fs/usr/share/samba $fs/etc/samba
26 cp -a $src/. $fs/usr/share/samba
27 cp -a $stuff/* $fs
28 }
30 post_install()
31 {
32 if [ -f "$1/etc/locale.conf" ]; then
33 lang=$(. "$1/etc/locale.conf"; echo ${LANG%_*})
34 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
35 "$1/etc/samba/smbwebclient.conf"
36 fi
38 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
39 if ! grep -q /usr/share/samba/ "$1/etc/lighttpd/lighttpd.conf"; then
40 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
41 if [ -z "$1" ]; then
42 # Start Web server.
43 /etc/init.d/lighttpd stop
44 /etc/init.d/lighttpd start
45 fi
46 fi
47 fi
48 # Configure apache server
49 if [ -f "$1/etc/apache/httpd.conf" ]; then
50 if [ ! -f "$1/etc/apache/conf.d/smbwebclient" ]; then
51 cat > "$1/etc/apache/conf.d/smbwebclient" <<EOT
52 <IfModule mod_alias.c>
53 Alias /smbwebclient /usr/share/samba
54 </IfModule>
55 <DirectoryMatch /usr/share/samba/>
56 DirectoryIndex index.php
57 Options +FollowSymLinks
58 AllowOverride None
59 Order allow,deny
60 Allow from all
61 </DirectoryMatch>
62 EOT
63 if [ -z "$1" ]; then
64 # Start Web server.
65 /etc/init.d/apache restart
66 fi
67 fi
68 fi
69 cat <<EOF
70 ---
71 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
72 ---
73 EOF
74 }