wok-current annotate boxbackup-client/receipt @ rev 10324

ejabberd: Add $CONFIGURE_ARGS.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun May 22 00:21:45 2011 +0000 (2011-05-22)
parents ab455c725e30
children e542ba4fbc72
rev   line source
domcox@1357 1 # SliTaz package receipt.
domcox@1357 2
domcox@1357 3 PACKAGE="boxbackup-client"
domcox@5508 4 VERSION="0.11rc8"
domcox@1357 5 CATEGORY="network"
domcox@1357 6 SHORT_DESC="Client for the BoxBackup on-line backup system"
domcox@1357 7 MAINTAINER="domcox@users.sourceforge.net"
erjo@8277 8 DEPENDS="db libedit libssl perl zlib gcc-lib-base"
domcox@1357 9 SOURCE="boxbackup"
domcox@1357 10 WANTED="boxbackup-server"
domcox@1357 11 WEB_SITE="http://www.boxbackup.org/"
jozee@3568 12 TAGS="backup automatic client"
domcox@1357 13
domcox@1357 14 # Configuration variables
domcox@1357 15 CONF_DIR="/etc/box"
domcox@1357 16 DATA_DIR="/var/lib/bbackupd"
domcox@1357 17 RUN_DMON=0
domcox@1357 18
domcox@1357 19 # Rules to gen a SliTaz package suitable for Tazpkg
domcox@1357 20 genpkg_rules()
domcox@1357 21 {
domcox@1357 22 mkdir -p $fs/usr/bin
pascal@9099 23 cp -a $_pkg/boxbackup-${VERSION}-backup-client-linux-gnu/bb* $fs/usr/bin
pascal@9100 24 rm -f $fs/usr/bin/*.*
domcox@1357 25 mkdir -p $fs/etc/init.d
pankso@9697 26 cp -a $stuff/bbackupd $fs/etc/init.d
domcox@1357 27 }
domcox@1357 28
domcox@1357 29 # Pre and post install commands for Tazpkg
domcox@1357 30
domcox@1357 31 pre_install()
domcox@1357 32 {
domcox@1357 33 # Stop daemon
domcox@1357 34 if [ -e /var/run/bbackupd.pid ]; then
domcox@1357 35 /etc/init.d/bbackupd stop
domcox@1357 36 RUN_DMON=1
domcox@1357 37 fi
domcox@1357 38 }
domcox@1357 39
domcox@1357 40 post_install()
domcox@1357 41 {
domcox@1357 42 # Creating conf dir
slaxemulator@8751 43 if [ ! -e $1/$CONF_DIR ]; then
slaxemulator@8751 44 mkdir -p $1/$CONF_DIR && chmod 755 $1/$CONF_DIR
domcox@1357 45 fi
slaxemulator@8751 46 if [ ! -e $1/$DATA_DIR ]; then
slaxemulator@8751 47 mkdir -p $1/$DATA_DIR && chmod 700 $1/$DATA_DIR
domcox@1357 48 fi
slaxemulator@8751 49 if [ -z $1 ]; then
slaxemulator@8751 50 # Start daemon (if stopped by install)
slaxemulator@8751 51 if [ $RUN_DMON -eq 1 ]; then
slaxemulator@8751 52 /etc/init.d/bbackupd start
slaxemulator@8751 53 fi
domcox@1357 54 fi
domcox@1357 55 }
domcox@1357 56
domcox@1357 57 # Pre and post remove commands for Tazpkg
domcox@1357 58
domcox@1357 59 pre_remove()
domcox@1357 60 {
domcox@1357 61 # Stop daemon
slaxemulator@8751 62 if [ -z $1 ]; then
slaxemulator@8751 63 if [ -e /var/run/bbackupd.pid ]; then
slaxemulator@8751 64 /etc/init.d/bbackupd stop
slaxemulator@8751 65 fi
domcox@1357 66 fi
domcox@1357 67 }
domcox@1357 68
domcox@1357 69 post_remove()
domcox@1357 70 {
domcox@1357 71 # Delete DATA directory
slaxemulator@8751 72 rm -rf $1/$DATA_DIR
domcox@1357 73
domcox@1357 74 # Delete Client config files
slaxemulator@8751 75 rm -rf $1/$CONF_DIR/bbackupd*
domcox@1357 76
domcox@1357 77 # Delete CONF dir (if empty)
domcox@1899 78 if [ `ls -lA $CONF_DIR | wc -l` -eq 0 ]; then
domcox@1357 79 echo -n "Removing $CONF_DIR..."
slaxemulator@8751 80 rm -rf $1/$CONF_DIR
domcox@1357 81 status
domcox@1357 82 fi
domcox@1357 83 # Delete PID, sock files
slaxemulator@8751 84 rm -f $1/var/run/bbackupd.*
jozee@3568 85 }