# SliTaz package receipt. PACKAGE="smbwebclient" VERSION="2.9" CATEGORY="network" SHORT_DESC="Samba client over the Web." MAINTAINER="pascal.bellard@slitaz.org" TARBALL="$PACKAGE-$VERSION.php.gz" WEB_SITE="http://$PACKAGE.sourceforge.net/" DEPENDS="php smbclient" WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" CONFIG_FILES="/etc/samba/smbwebclient.conf" COOK_OPT="!unpack !repack_src" # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { if [ ! -d $src ]; then mkdir -p $src cp $SOURCES_REPOSITORY/$TARBALL $src gunzip $src/$TARBALL fi mkdir -p $fs/usr/share/samba $fs/etc/samba cp -a $src/. $fs/usr/share/samba cp -a $stuff/* $fs } post_install() { if [ -f $1/etc/locale.conf ]; then lang=$(. /etc/locale.conf; echo ${LANG%_*}) sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \ $1/etc/samba/smbwebclient.conf fi if [ -f $1/etc/lighttpd/lighttpd.conf ]; then if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf if [ -z "$1" ]; then # Start Web server. /etc/init.d/lighttpd stop /etc/init.d/lighttpd start fi fi fi # Configure apache server if [ -f $1/etc/apache/httpd.conf ]; then if [ ! -f $1/etc/apache/conf.d/smbwebclient ]; then cat > $1/etc/apache/conf.d/smbwebclient < Alias /smbwebclient /usr/share/samba DirectoryIndex index.php Options +FollowSymLinks AllowOverride None Order allow,deny Allow from all EOT if [ -z "$1" ]; then # Start Web server. /etc/init.d/apache restart fi fi fi cat <