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

avrdude: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Feb 05 17:11:25 2022 +0000 (2022-02-05)
parents cc177a7db8f1
children
rev   line source
domcox@1357 1 # SliTaz package receipt.
domcox@1357 2
domcox@1357 3 PACKAGE="boxbackup-client"
Hans-G?nter@22561 4 VERSION="0.12"
domcox@1357 5 CATEGORY="network"
Hans-G?nter@22561 6 TAGS="backup automatic client"
Hans-G?nter@22561 7 SHORT_DESC="Client for the BoxBackup on-line backup system."
domcox@12351 8 MAINTAINER="domcox@slitaz.org"
pascal@15202 9 LICENSE="GPL2"
Hans-G?nter@22561 10 WEB_SITE="https://www.boxbackup.org/"
Hans-G?nter@22561 11
domcox@1357 12 SOURCE="boxbackup"
Hans-G?nter@22561 13 DEPENDS="db gcc-lib-base libedit libssl perl zlib"
domcox@1357 14 WANTED="boxbackup-server"
pascal@15202 15
al@18668 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
domcox@1357 25 mkdir -p $fs/etc/init.d
Hans-G?nter@22561 26
Hans-G?nter@22561 27 cp -a $install/boxbackup-git_-backup-client-i486-slitaz-linux-gnu/bb* \
Hans-G?nter@22561 28 $fs/usr/bin
Hans-G?nter@22561 29 rm -f $fs/usr/bin/*.*
Hans-G?nter@22561 30 cp -a $stuff/bbackupd $fs/etc/init.d
domcox@1357 31 }
domcox@1357 32
domcox@1357 33 # Pre and post install commands for Tazpkg
domcox@1357 34
domcox@1357 35 pre_install()
domcox@1357 36 {
domcox@1357 37 # Stop daemon
Hans-G?nter@22561 38 if [ -z "$1" -a -e /var/run/bbackupd.pid ]
Hans-G?nter@22561 39 then
domcox@1357 40 /etc/init.d/bbackupd stop
domcox@1357 41 RUN_DMON=1
domcox@1357 42 fi
domcox@1357 43 }
domcox@1357 44
domcox@1357 45 post_install()
domcox@1357 46 {
Hans-G?nter@22561 47 # Creating configuration directory
Hans-G?nter@22561 48 if [ ! -e "$1/$CONF_DIR" ]
Hans-G?nter@22561 49 then
al@18668 50 mkdir -p "$1/$CONF_DIR" && chmod 755 "$1/$CONF_DIR"
domcox@1357 51 fi
Hans-G?nter@22561 52
Hans-G?nter@22561 53 # Create data directory
Hans-G?nter@22561 54 if [ ! -e "$1/$DATA_DIR" ]
Hans-G?nter@22561 55 then
al@18668 56 mkdir -p "$1/$DATA_DIR" && chmod 700 "$1/$DATA_DIR"
domcox@1357 57 fi
Hans-G?nter@22561 58
Hans-G?nter@22561 59 if [ -z "$1" ]
Hans-G?nter@22561 60 then
slaxemulator@8751 61 # Start daemon (if stopped by install)
Hans-G?nter@22561 62 if [ $RUN_DMON -eq 1 ]
Hans-G?nter@22561 63 then
slaxemulator@8751 64 /etc/init.d/bbackupd start
slaxemulator@8751 65 fi
domcox@1357 66 fi
pascal@18707 67 true
domcox@1357 68 }
domcox@1357 69
domcox@1357 70 # Pre and post remove commands for Tazpkg
domcox@1357 71
domcox@1357 72 pre_remove()
domcox@1357 73 {
al@18668 74 # Stop daemon
Hans-G?nter@22561 75 if [ -z "$1" ]
Hans-G?nter@22561 76 then
Hans-G?nter@22561 77 if [ -e /var/run/bbackupd.pid ]
Hans-G?nter@22561 78 then
slaxemulator@8751 79 /etc/init.d/bbackupd stop
slaxemulator@8751 80 fi
domcox@1357 81 fi
domcox@1357 82 }
domcox@1357 83
domcox@1357 84 post_remove()
domcox@1357 85 {
domcox@1357 86 # Delete DATA directory
al@18668 87 rm -rf "$1/$DATA_DIR"
domcox@1357 88
Hans-G?nter@22561 89 # Delete Client configuration file
al@18668 90 rm -rf "$1/$CONF_DIR"/bbackupd*
domcox@1357 91
domcox@1357 92 # Delete CONF dir (if empty)
Hans-G?nter@22561 93 if [ $(ls -lA "$1/$CONF_DIR" | wc -l) -eq 0 ]
Hans-G?nter@22561 94 then
al@18668 95 echo
al@18668 96 action "Removing $CONF_DIR..."
pascal@18730 97 rm -rf "$1/$CONF_DIR"
domcox@1357 98 status
domcox@1357 99 fi
Hans-G?nter@22561 100
domcox@1357 101 # Delete PID, sock files
pascal@18730 102 rm -f "$1/var/run/bbackupd".*
jozee@3568 103 }
Hans-G?nter@22562 104