wok view boxbackup-client/receipt @ rev 1377
Add: ncmpc (mpd ncurses client)
author | Paul Issott <paul@slitaz.org> |
---|---|
date | Thu Sep 11 15:19:20 2008 +0000 (2008-09-11) |
parents | |
children | a7e71267442a |
line source
1 # SliTaz package receipt.
3 PACKAGE="boxbackup-client"
4 VERSION="0.10"
5 CATEGORY="network"
6 SHORT_DESC="Client for the BoxBackup on-line backup system"
7 MAINTAINER="domcox@users.sourceforge.net"
8 DEPENDS="db libedit openssl perl zlib"
9 SOURCE="boxbackup"
10 WANTED="boxbackup-server"
11 WEB_SITE="http://www.boxbackup.org/"
13 # Configuration variables
14 CONF_DIR="/etc/box"
15 DATA_DIR="/var/lib/bbackupd"
16 RUN_DMON=0
18 # Rules to gen a SliTaz package suitable for Tazpkg
19 genpkg_rules()
20 {
21 _pkg=$WOK/$WANTED/${SOURCE}-$VERSION/parcels/boxbackup-${VERSION}-backup-client-linux-gnu
22 mkdir -p $fs/usr/bin
23 cp -a $_pkg/bb* $fs/usr/bin
24 mkdir -p $fs/etc/init.d
25 cp -a stuff/bbackupd $fs/etc/init.d
26 }
28 # Pre and post install commands for Tazpkg
30 pre_install()
31 {
32 # Stop daemon
33 if [ -e /var/run/bbackupd.pid ]; then
34 /etc/init.d/bbackupd stop
35 RUN_DMON=1
36 fi
37 }
39 post_install()
40 {
41 # Creating conf dir
42 if [ ! -e $CONF_DIR ]; then
43 mkdir -p $CONF_DIR && chmod 755 $CONF_DIR
44 fi
45 if [ ! -e $DATA_DIR ]; then
46 mkdir -p $DATA_DIR && chmod 700 $DATA_DIR
47 fi
48 # Start daemon (if stopped by install)
49 if [ $RUN_DMON -eq 1 ]; then
50 /etc/init.d/bbackupd start
51 fi
52 }
54 # Pre and post remove commands for Tazpkg
56 pre_remove()
57 {
58 # Stop daemon
59 if [ -e /var/run/bbackupd.pid ]; then
60 /etc/init.d/bbackupd stop
61 fi
62 }
64 post_remove()
65 {
66 # Delete DATA directory
67 rm -rf $DATA_DIR
69 # Delete Client config files
70 rm -rf $CONF_DIR/bbackupd*
72 # Delete CONF dir (if empty)
73 if [ `ls $CONF_DIR | wc -l` -eq 0 ]; then
74 echo -n "Removing $CONF_DIR..."
75 rm -rf $CONF_DIR
76 status
77 fi
78 # Delete PID, sock files
79 rm -f /var/run/bbackupd.*
80 }