wok annotate boxbackup-client/receipt @ rev 4246

poppler: fix *DEPENDS and split qt4 libs (add poppler-qt4)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Sep 24 23:04:14 2009 +0200 (2009-09-24)
parents a7e71267442a
children 395ec8205cff
rev   line source
domcox@1357 1 # SliTaz package receipt.
domcox@1357 2
domcox@1357 3 PACKAGE="boxbackup-client"
domcox@1357 4 VERSION="0.10"
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"
domcox@1357 8 DEPENDS="db libedit openssl perl zlib"
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 _pkg=$WOK/$WANTED/${SOURCE}-$VERSION/parcels/boxbackup-${VERSION}-backup-client-linux-gnu
domcox@1357 23 mkdir -p $fs/usr/bin
domcox@1357 24 cp -a $_pkg/bb* $fs/usr/bin
domcox@1357 25 mkdir -p $fs/etc/init.d
domcox@1357 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
domcox@1357 43 if [ ! -e $CONF_DIR ]; then
domcox@1357 44 mkdir -p $CONF_DIR && chmod 755 $CONF_DIR
domcox@1357 45 fi
domcox@1357 46 if [ ! -e $DATA_DIR ]; then
domcox@1357 47 mkdir -p $DATA_DIR && chmod 700 $DATA_DIR
domcox@1357 48 fi
domcox@1357 49 # Start daemon (if stopped by install)
domcox@1357 50 if [ $RUN_DMON -eq 1 ]; then
domcox@1357 51 /etc/init.d/bbackupd start
domcox@1357 52 fi
domcox@1357 53 }
domcox@1357 54
domcox@1357 55 # Pre and post remove commands for Tazpkg
domcox@1357 56
domcox@1357 57 pre_remove()
domcox@1357 58 {
domcox@1357 59 # Stop daemon
domcox@1357 60 if [ -e /var/run/bbackupd.pid ]; then
domcox@1357 61 /etc/init.d/bbackupd stop
domcox@1357 62 fi
domcox@1357 63 }
domcox@1357 64
domcox@1357 65 post_remove()
domcox@1357 66 {
domcox@1357 67 # Delete DATA directory
domcox@1357 68 rm -rf $DATA_DIR
domcox@1357 69
domcox@1357 70 # Delete Client config files
domcox@1357 71 rm -rf $CONF_DIR/bbackupd*
domcox@1357 72
domcox@1357 73 # Delete CONF dir (if empty)
domcox@1899 74 if [ `ls -lA $CONF_DIR | wc -l` -eq 0 ]; then
domcox@1357 75 echo -n "Removing $CONF_DIR..."
domcox@1357 76 rm -rf $CONF_DIR
domcox@1357 77 status
domcox@1357 78 fi
domcox@1357 79 # Delete PID, sock files
domcox@1357 80 rm -f /var/run/bbackupd.*
jozee@3568 81 }