wok-current view smbwebclient/receipt @ rev 11437
libgnomeprintui: add intltool to BUILD_DEPENDS
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Dec 16 15:42:01 2011 +0100 (2011-12-16) |
parents | f5b04145b323 |
children | 3b4e4318134e |
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 TARBALL="$PACKAGE-$VERSION.php.gz"
9 WEB_SITE="http://$PACKAGE.sourceforge.net/"
10 DEPENDS="php smbclient"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 CONFIG_FILES="/etc/samba/smbwebclient.conf"
13 COOK_OPT="!unpack !repack_src"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 if [ ! -d $src ]; then
19 mkdir -p $src
20 cp $SOURCES_REPOSITORY/$TARBALL $src
21 gunzip $src/$TARBALL
22 fi
24 mkdir -p $fs/usr/share/samba $fs/etc/samba
25 cp -a $src/. $fs/usr/share/samba
26 cp -a $stuff/* $fs
27 }
29 post_install()
30 {
31 if [ -f $1/etc/locale.conf ]; then
32 lang=$(. /etc/locale.conf; echo ${LANG%_*})
33 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \
34 $1/etc/samba/smbwebclient.conf
35 fi
37 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
38 if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then
39 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf
40 if [ -z "$1" ]; then
41 # Start Web server.
42 /etc/init.d/lighttpd stop
43 /etc/init.d/lighttpd start
44 fi
45 fi
46 fi
47 # Configure apache server
48 if [ -f $1/etc/apache/httpd.conf ]; then
49 if [ ! -f $1/etc/apache/conf.d/smbwebclient ]; then
50 cat > $1/etc/apache/conf.d/smbwebclient <<EOT
51 <IfModule mod_alias.c>
52 Alias /smbwebclient /usr/share/samba
53 </IfModule>
54 <DirectoryMatch /usr/share/samba/>
55 DirectoryIndex index.php
56 Options +FollowSymLinks
57 AllowOverride None
58 Order allow,deny
59 Allow from all
60 </DirectoryMatch>
61 EOT
62 if [ -z "$1" ]; then
63 # Start Web server.
64 /etc/init.d/apache restart
65 fi
66 fi
67 fi
68 cat <<EOF
69 ---
70 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf
71 ---
72 EOF
73 }