wok annotate boxbackup-client/receipt @ rev 18334
Updates licenses
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Sep 10 10:00:06 2015 +0200 (2015-09-10) |
parents | e7e64bbf2386 |
children | fca172c323cf |
rev | line source |
---|---|
domcox@1357 | 1 # SliTaz package receipt. |
domcox@1357 | 2 |
domcox@1357 | 3 PACKAGE="boxbackup-client" |
domcox@10920 | 4 VERSION="0.11.1" |
domcox@1357 | 5 CATEGORY="network" |
domcox@1357 | 6 SHORT_DESC="Client for the BoxBackup on-line backup system" |
domcox@12351 | 7 MAINTAINER="domcox@slitaz.org" |
pascal@15202 | 8 LICENSE="GPL2" |
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 |
pascal@15202 | 14 DEPENDS="db libedit libssl perl zlib gcc-lib-base" |
pascal@15202 | 15 |
domcox@1357 | 16 # Configuration variables |
domcox@12351 | 17 CONF_DIR="/etc/boxbackup" |
domcox@1357 | 18 DATA_DIR="/var/lib/bbackupd" |
domcox@1357 | 19 RUN_DMON=0 |
domcox@1357 | 20 |
domcox@1357 | 21 # Rules to gen a SliTaz package suitable for Tazpkg |
domcox@1357 | 22 genpkg_rules() |
domcox@1357 | 23 { |
domcox@1357 | 24 mkdir -p $fs/usr/bin |
pascal@15202 | 25 cp -a $install/boxbackup-${VERSION}-backup-client-linux-gnu/bb* $fs/usr/bin |
pascal@9100 | 26 rm -f $fs/usr/bin/*.* |
domcox@1357 | 27 mkdir -p $fs/etc/init.d |
pankso@9697 | 28 cp -a $stuff/bbackupd $fs/etc/init.d |
domcox@1357 | 29 } |
domcox@1357 | 30 |
domcox@1357 | 31 # Pre and post install commands for Tazpkg |
domcox@1357 | 32 |
domcox@1357 | 33 pre_install() |
domcox@1357 | 34 { |
domcox@1357 | 35 # Stop daemon |
domcox@1357 | 36 if [ -e /var/run/bbackupd.pid ]; then |
domcox@1357 | 37 /etc/init.d/bbackupd stop |
domcox@1357 | 38 RUN_DMON=1 |
domcox@1357 | 39 fi |
domcox@1357 | 40 } |
domcox@1357 | 41 |
domcox@1357 | 42 post_install() |
domcox@1357 | 43 { |
domcox@1357 | 44 # Creating conf dir |
slaxemulator@8751 | 45 if [ ! -e $1/$CONF_DIR ]; then |
slaxemulator@8751 | 46 mkdir -p $1/$CONF_DIR && chmod 755 $1/$CONF_DIR |
domcox@1357 | 47 fi |
slaxemulator@8751 | 48 if [ ! -e $1/$DATA_DIR ]; then |
slaxemulator@8751 | 49 mkdir -p $1/$DATA_DIR && chmod 700 $1/$DATA_DIR |
domcox@1357 | 50 fi |
slaxemulator@8751 | 51 if [ -z $1 ]; then |
slaxemulator@8751 | 52 # Start daemon (if stopped by install) |
slaxemulator@8751 | 53 if [ $RUN_DMON -eq 1 ]; then |
slaxemulator@8751 | 54 /etc/init.d/bbackupd start |
slaxemulator@8751 | 55 fi |
domcox@1357 | 56 fi |
domcox@1357 | 57 } |
domcox@1357 | 58 |
domcox@1357 | 59 # Pre and post remove commands for Tazpkg |
domcox@1357 | 60 |
domcox@1357 | 61 pre_remove() |
domcox@1357 | 62 { |
domcox@1357 | 63 # Stop daemon |
slaxemulator@8751 | 64 if [ -z $1 ]; then |
slaxemulator@8751 | 65 if [ -e /var/run/bbackupd.pid ]; then |
slaxemulator@8751 | 66 /etc/init.d/bbackupd stop |
slaxemulator@8751 | 67 fi |
domcox@1357 | 68 fi |
domcox@1357 | 69 } |
domcox@1357 | 70 |
domcox@1357 | 71 post_remove() |
domcox@1357 | 72 { |
domcox@1357 | 73 # Delete DATA directory |
slaxemulator@8751 | 74 rm -rf $1/$DATA_DIR |
domcox@1357 | 75 |
domcox@1357 | 76 # Delete Client config files |
slaxemulator@8751 | 77 rm -rf $1/$CONF_DIR/bbackupd* |
domcox@1357 | 78 |
domcox@1357 | 79 # Delete CONF dir (if empty) |
domcox@12351 | 80 if [ $(ls -lA $CONF_DIR | wc -l) -eq 0 ]; then |
domcox@1357 | 81 echo -n "Removing $CONF_DIR..." |
slaxemulator@8751 | 82 rm -rf $1/$CONF_DIR |
domcox@1357 | 83 status |
domcox@1357 | 84 fi |
domcox@1357 | 85 # Delete PID, sock files |
slaxemulator@8751 | 86 rm -f $1/var/run/bbackupd.* |
jozee@3568 | 87 } |