wok-current annotate smbwebclient/receipt @ rev 1247
Add smbwebclient
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Aug 12 14:54:18 2008 +0000 (2008-08-12) |
parents | |
children | 5fe0d4cca0be |
rev | line source |
---|---|
pascal@1247 | 1 # SliTaz package receipt. |
pascal@1247 | 2 |
pascal@1247 | 3 PACKAGE="smbwebclient" |
pascal@1247 | 4 VERSION="2.9" |
pascal@1247 | 5 CATEGORY="network" |
pascal@1247 | 6 SHORT_DESC="Samba client over the Web." |
pascal@1247 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@1247 | 8 WEB_SITE="http://$PACKAGE.sourceforge.net/" |
pascal@1247 | 9 DEPENDS="php smbclient" |
pascal@1247 | 10 CONFIG_FILES="/etc/samba/smbwebclient.conf" |
pascal@1247 | 11 |
pascal@1247 | 12 # Rules to configure and make the package. |
pascal@1247 | 13 compile_rules() |
pascal@1247 | 14 { |
pascal@1247 | 15 if [ ! -d $src ]; then |
pascal@1247 | 16 mkdir -p $src |
pascal@1247 | 17 wget $SF_MIRROR/$PACKAGE/$PACKAGE-$VERSION.php.gz |
pascal@1247 | 18 mv $PACKAGE-$VERSION.php.gz $src |
pascal@1247 | 19 gunzip $src/$PACKAGE-$VERSION.php.gz |
pascal@1247 | 20 fi |
pascal@1247 | 21 } |
pascal@1247 | 22 |
pascal@1247 | 23 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1247 | 24 genpkg_rules() |
pascal@1247 | 25 { |
pascal@1247 | 26 mkdir -p $fs/usr/share/samba $fs/etc/samba |
pascal@1247 | 27 cp -a $src/. $fs/usr/share/samba |
pascal@1247 | 28 cp -a stuff/* $fs |
pascal@1247 | 29 } |
pascal@1247 | 30 |
pascal@1247 | 31 post_install() |
pascal@1247 | 32 { |
pascal@1247 | 33 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ |
pascal@1247 | 34 $1/$INSTALLED/$PACKAGE/volatile.cpio.gz <<EOT |
pascal@1247 | 35 etc/samba/smbwebclient.conf |
pascal@1247 | 36 EOT |
pascal@1247 | 37 if [ -f $1/etc/locale.conf ]; then |
pascal@1247 | 38 lang=$(. /etc/locale.conf; echo ${LANG%_*}) |
pascal@1247 | 39 sed -i "s/DefaultLanguage = 'us'/DefaultLanguage = '$lang'/" \ |
pascal@1247 | 40 $1/etc/samba/smbwebclient.conf |
pascal@1247 | 41 fi |
pascal@1247 | 42 |
pascal@1247 | 43 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@1247 | 44 if ! grep -q /usr/share/samba/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@1247 | 45 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/smbwebclient/" => "/usr/share/samba/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@1247 | 46 if [ -z "$1" ]; then |
pascal@1247 | 47 # Start Web server. |
pascal@1247 | 48 /etc/init.d/lighttpd stop |
pascal@1247 | 49 /etc/init.d/lighttpd start |
pascal@1247 | 50 fi |
pascal@1247 | 51 fi |
pascal@1247 | 52 fi |
pascal@1247 | 53 cat <<EOF |
pascal@1247 | 54 --- |
pascal@1247 | 55 Check \$cfgDefaultServer in configuration file /etc/samba/smbwebclient.conf |
pascal@1247 | 56 --- |
pascal@1247 | 57 EOF |
pascal@1247 | 58 } |
pascal@1247 | 59 |
pascal@1247 | 60 repack_cleanup() |
pascal@1247 | 61 { |
pascal@1247 | 62 zcat $INSTALLED/$PACKAGE/volatile.cpio.gz | ( cd $1 ; cpio -id ) |
pascal@1247 | 63 } |