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