wok-current annotate boxbackup-client/receipt @ rev 2820
Add Dillo (Hg version) - Provide CSS support!
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Apr 29 21:18:16 2009 +0200 (2009-04-29) |
parents | 14003687d2b8 |
children | f9e78593eb58 |
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/" |
domcox@1357 | 12 |
domcox@1357 | 13 # Configuration variables |
domcox@1357 | 14 CONF_DIR="/etc/box" |
domcox@1357 | 15 DATA_DIR="/var/lib/bbackupd" |
domcox@1357 | 16 RUN_DMON=0 |
domcox@1357 | 17 |
domcox@1357 | 18 # Rules to gen a SliTaz package suitable for Tazpkg |
domcox@1357 | 19 genpkg_rules() |
domcox@1357 | 20 { |
domcox@1357 | 21 _pkg=$WOK/$WANTED/${SOURCE}-$VERSION/parcels/boxbackup-${VERSION}-backup-client-linux-gnu |
domcox@1357 | 22 mkdir -p $fs/usr/bin |
domcox@1357 | 23 cp -a $_pkg/bb* $fs/usr/bin |
domcox@1357 | 24 mkdir -p $fs/etc/init.d |
domcox@1357 | 25 cp -a stuff/bbackupd $fs/etc/init.d |
domcox@1357 | 26 } |
domcox@1357 | 27 |
domcox@1357 | 28 # Pre and post install commands for Tazpkg |
domcox@1357 | 29 |
domcox@1357 | 30 pre_install() |
domcox@1357 | 31 { |
domcox@1357 | 32 # Stop daemon |
domcox@1357 | 33 if [ -e /var/run/bbackupd.pid ]; then |
domcox@1357 | 34 /etc/init.d/bbackupd stop |
domcox@1357 | 35 RUN_DMON=1 |
domcox@1357 | 36 fi |
domcox@1357 | 37 } |
domcox@1357 | 38 |
domcox@1357 | 39 post_install() |
domcox@1357 | 40 { |
domcox@1357 | 41 # Creating conf dir |
domcox@1357 | 42 if [ ! -e $CONF_DIR ]; then |
domcox@1357 | 43 mkdir -p $CONF_DIR && chmod 755 $CONF_DIR |
domcox@1357 | 44 fi |
domcox@1357 | 45 if [ ! -e $DATA_DIR ]; then |
domcox@1357 | 46 mkdir -p $DATA_DIR && chmod 700 $DATA_DIR |
domcox@1357 | 47 fi |
domcox@1357 | 48 # Start daemon (if stopped by install) |
domcox@1357 | 49 if [ $RUN_DMON -eq 1 ]; then |
domcox@1357 | 50 /etc/init.d/bbackupd start |
domcox@1357 | 51 fi |
domcox@1357 | 52 } |
domcox@1357 | 53 |
domcox@1357 | 54 # Pre and post remove commands for Tazpkg |
domcox@1357 | 55 |
domcox@1357 | 56 pre_remove() |
domcox@1357 | 57 { |
domcox@1357 | 58 # Stop daemon |
domcox@1357 | 59 if [ -e /var/run/bbackupd.pid ]; then |
domcox@1357 | 60 /etc/init.d/bbackupd stop |
domcox@1357 | 61 fi |
domcox@1357 | 62 } |
domcox@1357 | 63 |
domcox@1357 | 64 post_remove() |
domcox@1357 | 65 { |
domcox@1357 | 66 # Delete DATA directory |
domcox@1357 | 67 rm -rf $DATA_DIR |
domcox@1357 | 68 |
domcox@1357 | 69 # Delete Client config files |
domcox@1357 | 70 rm -rf $CONF_DIR/bbackupd* |
domcox@1357 | 71 |
domcox@1357 | 72 # Delete CONF dir (if empty) |
domcox@1899 | 73 if [ `ls -lA $CONF_DIR | wc -l` -eq 0 ]; then |
domcox@1357 | 74 echo -n "Removing $CONF_DIR..." |
domcox@1357 | 75 rm -rf $CONF_DIR |
domcox@1357 | 76 status |
domcox@1357 | 77 fi |
domcox@1357 | 78 # Delete PID, sock files |
domcox@1357 | 79 rm -f /var/run/bbackupd.* |
domcox@1357 | 80 } |