wok diff boxbackup-client/receipt @ rev 8751

Removed all/most _pkg= lines in wok. The new tazwok-experimental can SOURCE paths and source are are all extracted to WOK/PACKAGE/PACKAGE-VERSION now with tazwok-experimental.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Feb 20 06:53:59 2011 +0000 (2011-02-20)
parents da1d7c470a31
children 3882bea139c1
line diff
     1.1 --- a/boxbackup-client/receipt	Sun Jan 30 20:40:51 2011 +0100
     1.2 +++ b/boxbackup-client/receipt	Sun Feb 20 06:53:59 2011 +0000
     1.3 @@ -19,7 +19,7 @@
     1.4  # Rules to gen a SliTaz package suitable for Tazpkg
     1.5  genpkg_rules()
     1.6  {
     1.7 - 	_pkg=$WOK/$WANTED/${SOURCE}-$VERSION/parcels/boxbackup-${VERSION}-backup-client-linux-gnu
     1.8 +	_pkg=$WOK/$WANTED/${SOURCE}-$VERSION/parcels/boxbackup-${VERSION}-backup-client-linux-gnu
     1.9  	mkdir -p $fs/usr/bin
    1.10  	cp -a $_pkg/bb* $fs/usr/bin
    1.11  	mkdir -p $fs/etc/init.d
    1.12 @@ -40,15 +40,17 @@
    1.13  post_install()
    1.14  {
    1.15  	# Creating conf dir
    1.16 -	if [ ! -e $CONF_DIR ]; then
    1.17 -	    mkdir -p $CONF_DIR && chmod 755 $CONF_DIR
    1.18 +	if [ ! -e $1/$CONF_DIR ]; then
    1.19 +	    mkdir -p $1/$CONF_DIR && chmod 755 $1/$CONF_DIR
    1.20  	fi
    1.21 -	if [ ! -e $DATA_DIR ]; then
    1.22 -	    mkdir -p $DATA_DIR && chmod 700 $DATA_DIR
    1.23 +	if [ ! -e $1/$DATA_DIR ]; then
    1.24 +	    mkdir -p $1/$DATA_DIR && chmod 700 $1/$DATA_DIR
    1.25  	fi
    1.26 -	# Start daemon (if stopped by install)
    1.27 -	if [ $RUN_DMON -eq 1 ]; then
    1.28 -		/etc/init.d/bbackupd start
    1.29 +	if [ -z $1 ]; then
    1.30 +		# Start daemon (if stopped by install)
    1.31 +		if [ $RUN_DMON -eq 1 ]; then
    1.32 +			/etc/init.d/bbackupd start
    1.33 +		fi
    1.34  	fi
    1.35  }
    1.36  
    1.37 @@ -57,25 +59,27 @@
    1.38  pre_remove()
    1.39  {
    1.40      # Stop daemon
    1.41 -	if [ -e /var/run/bbackupd.pid ]; then
    1.42 -		/etc/init.d/bbackupd stop
    1.43 +	if [ -z $1 ]; then
    1.44 +		if [ -e /var/run/bbackupd.pid ]; then
    1.45 +			/etc/init.d/bbackupd stop
    1.46 +		fi
    1.47  	fi
    1.48  }
    1.49  
    1.50  post_remove()
    1.51  {
    1.52  	# Delete DATA directory
    1.53 -	rm -rf $DATA_DIR
    1.54 +	rm -rf $1/$DATA_DIR
    1.55  
    1.56  	# Delete Client config files
    1.57 -	rm -rf $CONF_DIR/bbackupd*
    1.58 +	rm -rf $1/$CONF_DIR/bbackupd*
    1.59  
    1.60  	# Delete CONF dir (if empty)
    1.61  	if [ `ls -lA $CONF_DIR | wc -l` -eq 0 ]; then
    1.62  		echo -n "Removing $CONF_DIR..."
    1.63 -		rm -rf $CONF_DIR
    1.64 +		rm -rf $1/$CONF_DIR
    1.65  		status
    1.66  	fi
    1.67  	# Delete PID, sock files
    1.68 -	rm -f /var/run/bbackupd.*
    1.69 +	rm -f $1/var/run/bbackupd.*
    1.70  }