wok-current view boxbackup-client/receipt @ rev 21900
updated serd and serd-dev (0.18.0 -> 0.30.0)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Oct 03 20:51:42 2019 +0100 (2019-10-03) |
parents | 9e01bc6321ea |
children | cc177a7db8f1 |
line source
1 # SliTaz package receipt.
3 PACKAGE="boxbackup-client"
4 VERSION="0.11.1"
5 CATEGORY="network"
6 SHORT_DESC="Client for the BoxBackup on-line backup system"
7 MAINTAINER="domcox@slitaz.org"
8 LICENSE="GPL2"
9 SOURCE="boxbackup"
10 WANTED="boxbackup-server"
11 WEB_SITE="https://www.boxbackup.org/"
12 TAGS="backup automatic client"
14 DEPENDS="db libedit libssl perl zlib gcc-lib-base"
16 # Configuration variables
17 CONF_DIR="/etc/boxbackup"
18 DATA_DIR="/var/lib/bbackupd"
19 RUN_DMON=0
21 # Rules to gen a SliTaz package suitable for Tazpkg
22 genpkg_rules()
23 {
24 mkdir -p $fs/usr/bin
25 cp -a $install/boxbackup-${VERSION}-backup-client-linux-gnu/bb* $fs/usr/bin
26 rm -f $fs/usr/bin/*.*
27 mkdir -p $fs/etc/init.d
28 cp -a $stuff/bbackupd $fs/etc/init.d
29 }
31 # Pre and post install commands for Tazpkg
33 pre_install()
34 {
35 # Stop daemon
36 if [ -z "$1" -a -e /var/run/bbackupd.pid ]; then
37 /etc/init.d/bbackupd stop
38 RUN_DMON=1
39 fi
40 }
42 post_install()
43 {
44 # Creating conf dir
45 if [ ! -e "$1/$CONF_DIR" ]; then
46 mkdir -p "$1/$CONF_DIR" && chmod 755 "$1/$CONF_DIR"
47 fi
48 if [ ! -e "$1/$DATA_DIR" ]; then
49 mkdir -p "$1/$DATA_DIR" && chmod 700 "$1/$DATA_DIR"
50 fi
51 if [ -z "$1" ]; then
52 # Start daemon (if stopped by install)
53 if [ $RUN_DMON -eq 1 ]; then
54 /etc/init.d/bbackupd start
55 fi
56 fi
57 true
58 }
60 # Pre and post remove commands for Tazpkg
62 pre_remove()
63 {
64 # Stop daemon
65 if [ -z "$1" ]; then
66 if [ -e /var/run/bbackupd.pid ]; then
67 /etc/init.d/bbackupd stop
68 fi
69 fi
70 }
72 post_remove()
73 {
74 # Delete DATA directory
75 rm -rf "$1/$DATA_DIR"
77 # Delete Client config files
78 rm -rf "$1/$CONF_DIR"/bbackupd*
80 # Delete CONF dir (if empty)
81 if [ $(ls -lA "$1/$CONF_DIR" | wc -l) -eq 0 ]; then
82 echo
83 action "Removing $CONF_DIR..."
84 rm -rf "$1/$CONF_DIR"
85 status
86 fi
87 # Delete PID, sock files
88 rm -f "$1/var/run/bbackupd".*
89 }