wok diff smbwebclient/receipt @ rev 1354
iUp: vim to 7.2.
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Sat Sep 06 15:08:50 2008 +0200 (2008-09-06) |
parents | |
children | 5fe0d4cca0be |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/smbwebclient/receipt Sat Sep 06 15:08:50 2008 +0200 1.3 @@ -0,0 +1,63 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="smbwebclient" 1.7 +VERSION="2.9" 1.8 +CATEGORY="network" 1.9 +SHORT_DESC="Samba client over the Web." 1.10 +MAINTAINER="pascal.bellard@slitaz.org" 1.11 +WEB_SITE="http://$PACKAGE.sourceforge.net/" 1.12 +DEPENDS="php smbclient" 1.13 +CONFIG_FILES="/etc/samba/smbwebclient.conf" 1.14 + 1.15 +# Rules to configure and make the package. 1.16 +compile_rules() 1.17 +{ 1.18 + if [ ! -d $src ]; then 1.19 + mkdir -p $src 1.20 + wget $SF_MIRROR/$PACKAGE/$PACKAGE-$VERSION.php.gz 1.21 + mv $PACKAGE-$VERSION.php.gz $src 1.22 + gunzip $src/$PACKAGE-$VERSION.php.gz 1.23 + fi 1.24 +} 1.25 + 1.26 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.27 +genpkg_rules() 1.28 +{ 1.29 + mkdir -p $fs/usr/share/samba $fs/etc/samba 1.30 + cp -a $src/. $fs/usr/share/samba 1.31 + cp -a stuff/* $fs 1.32 +} 1.33 + 1.34 +post_install() 1.35 +{ 1.36 + ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 1.37 + $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT 1.38 +etc/samba/smbwebclient.conf 1.39 +EOT 1.40 + if [ -f $1/etc/locale.conf ]; then 1.41 + lang=$(. /etc/locale.conf; echo ${LANG%_*}) 1.42 + sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \ 1.43 + $1/etc/samba/smbwebclient.conf 1.44 + fi 1.45 + 1.46 + if [ -f $1/etc/lighttpd/lighttpd.conf ]; then 1.47 + if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then 1.48 + sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf 1.49 + if [ -z "$1" ]; then 1.50 + # Start Web server. 1.51 + /etc/init.d/lighttpd stop 1.52 + /etc/init.d/lighttpd start 1.53 + fi 1.54 + fi 1.55 + fi 1.56 + cat <<EOF 1.57 +--- 1.58 +Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf 1.59 +--- 1.60 +EOF 1.61 +} 1.62 + 1.63 +repack_cleanup() 1.64 +{ 1.65 + zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) 1.66 +}