wok diff boxbackup-client/receipt @ rev 1842

transmission-web: configure lighttpd & apache
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 11 19:45:59 2008 +0000 (2008-12-11)
parents
children a7e71267442a
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/boxbackup-client/receipt	Thu Dec 11 19:45:59 2008 +0000
     1.3 @@ -0,0 +1,80 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="boxbackup-client"
     1.7 +VERSION="0.10"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Client for the BoxBackup on-line backup system"
    1.10 +MAINTAINER="domcox@users.sourceforge.net"
    1.11 +DEPENDS="db libedit openssl perl zlib"
    1.12 +SOURCE="boxbackup"
    1.13 +WANTED="boxbackup-server"
    1.14 +WEB_SITE="http://www.boxbackup.org/"
    1.15 +
    1.16 +# Configuration variables                                                                                                    
    1.17 +CONF_DIR="/etc/box"
    1.18 +DATA_DIR="/var/lib/bbackupd"
    1.19 +RUN_DMON=0
    1.20 +
    1.21 +# Rules to gen a SliTaz package suitable for Tazpkg
    1.22 +genpkg_rules()
    1.23 +{
    1.24 + 	_pkg=$WOK/$WANTED/${SOURCE}-$VERSION/parcels/boxbackup-${VERSION}-backup-client-linux-gnu
    1.25 +	mkdir -p $fs/usr/bin
    1.26 +	cp -a $_pkg/bb* $fs/usr/bin
    1.27 +	mkdir -p $fs/etc/init.d
    1.28 +	cp -a stuff/bbackupd $fs/etc/init.d
    1.29 +}
    1.30 +
    1.31 +# Pre and post install commands for Tazpkg
    1.32 +
    1.33 +pre_install()
    1.34 +{
    1.35 +	# Stop daemon
    1.36 +	if [ -e /var/run/bbackupd.pid ]; then
    1.37 +		/etc/init.d/bbackupd stop
    1.38 +		RUN_DMON=1
    1.39 +	fi
    1.40 +}
    1.41 +
    1.42 +post_install()
    1.43 +{
    1.44 +	# Creating conf dir
    1.45 +	if [ ! -e $CONF_DIR ]; then
    1.46 +	    mkdir -p $CONF_DIR && chmod 755 $CONF_DIR
    1.47 +	fi
    1.48 +	if [ ! -e $DATA_DIR ]; then
    1.49 +	    mkdir -p $DATA_DIR && chmod 700 $DATA_DIR
    1.50 +	fi
    1.51 +	# Start daemon (if stopped by install)
    1.52 +	if [ $RUN_DMON -eq 1 ]; then
    1.53 +		/etc/init.d/bbackupd start
    1.54 +	fi
    1.55 +}
    1.56 +
    1.57 +# Pre and post remove commands for Tazpkg
    1.58 +
    1.59 +pre_remove()
    1.60 +{
    1.61 +    # Stop daemon
    1.62 +	if [ -e /var/run/bbackupd.pid ]; then
    1.63 +		/etc/init.d/bbackupd stop
    1.64 +	fi
    1.65 +}
    1.66 +
    1.67 +post_remove()
    1.68 +{
    1.69 +	# Delete DATA directory
    1.70 +	rm -rf $DATA_DIR
    1.71 +
    1.72 +	# Delete Client config files
    1.73 +	rm -rf $CONF_DIR/bbackupd*
    1.74 +
    1.75 +	# Delete CONF dir (if empty)
    1.76 +	if [ `ls $CONF_DIR | wc -l` -eq 0 ]; then
    1.77 +		echo -n "Removing $CONF_DIR..."
    1.78 +		rm -rf $CONF_DIR
    1.79 +		status
    1.80 +	fi
    1.81 +	# Delete PID, sock files
    1.82 +	rm -f /var/run/bbackupd.*
    1.83 +}
    1.84 \ No newline at end of file