source: trunk/dports/sysutils/boxbackup/Portfile @ 90629

Last change on this file since 90629 was 90629, checked in by ecronin@…, 7 years ago

boxbackup: correct startupitem paths (#33578)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 90629 2012-03-10 18:20:20Z ecronin@macports.org $
3
4PortSystem      1.0
5
6name            boxbackup
7version         0.11.1
8revision        1
9categories      sysutils net
10license         BSD-old
11maintainers     ecronin openmaintainer
12description     completely automatic on-line backup system.
13long_description    The backup daemon, bbackupd, runs on all machines to \
14                    be backed up. The store server daemon, bbstored runs \
15                    on a central server. Data is sent to the store \
16                    server, which stores all data on local filesystems, \
17                    that is, only on local hard drives. Tape or other \
18                    archive media is not used. \
19                    The system is designed to be easy to set up and run, \
20                    and cheap to use. Once set up, there should be no \
21                    need for user or administrative intervention, apart \
22                    from usual system maintenance.
23homepage        http://www.boxbackup.org/
24platforms       darwin
25master_sites    ${homepage}svn/box/packages/
26extract.suffix  .tgz
27checksums       rmd160  17553b3ff06d19f353dbadc0166b7dceaa11c271 \
28                sha256  1328b010477259c4767276dbfebab6580e883336cc9d25696c39991b09cc6d32
29
30depends_lib     path:bin/perl:perl5 port:openssl port:libedit
31
32configure.args      --sysconfdir=${prefix}/etc \
33                    --localstatedir=${prefix}/var/bbackupd \
34                    --mandir=${prefix}/share/man
35
36use_parallel_build  no
37build.type bsd
38
39post-patch {
40    reinplace "s|man/man|share/man/man|g" \
41        ${worksrcpath}/infrastructure/makeparcels.pl.in
42}
43
44destroot.target     install-backup-client
45destroot.keepdirs   ${destroot}${prefix}/etc/boxbackup/bbackupd \
46                    ${destroot}${prefix}/var/bbackupd
47
48post-destroot {
49    xinstall -d -m 0700 ${destroot}${prefix}/etc/boxbackup/bbackupd
50    xinstall -d -m 0755 ${destroot}${prefix}/var/bbackupd
51
52    # Install the documentation
53    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
54    eval file copy [glob ${worksrcpath}/docs/htmlguide/*] \
55        ${destroot}${prefix}/share/doc/${name}/
56}
57
58variant bdb description {Use Berkeley Data Base to cache bbackupd state} {
59    depends_lib-append      port:db47
60
61    configure.args-append   --with-bdb-headers=${prefix}/include/db47 \
62                            --with-bdb-lib=${prefix}/lib/db47
63}
64
65variant server description {Install bbstored server} {
66    add_users bbstored group=bbstored realname=BoxBackup\ Server \
67        home=${prefix}/etc/boxbackup/bbstored
68    destroot.target-append      install-backup-server
69    destroot.keepdirs-append    ${destroot}${prefix}/etc/boxbackup/bbstored
70    post-destroot {
71        xinstall -o bbstored -g bbstored -d -m 0770 ${destroot}${prefix}/etc/boxbackup/bbstored
72    }
73}
74
75post-activate {
76    if {[file isdir ${prefix}/etc/box]} {
77        ui_warn "${prefix}/etc/box should be moved to ${prefix}/etc/boxbackup to complete upgrade."
78    }
79    if {[variant_isset server]} {
80        if {![file exists ${prefix}/etc/boxbackup/raidfile.conf]} {
81            ui_warn "${prefix}/etc/boxbackup/raidfile.conf is missing!"
82            ui_msg "You need to run 'raidfile-config' to create it."
83            ui_msg "See the documentation on server setup for details:"
84            #ui_msg "  file://${prefix}/share/doc/boxbackup/server.html"
85            ui_msg "  http://www.boxbackup.org/server.html"
86        }
87        if {![file exists ${prefix}/etc/boxbackup/bbstored.conf]} {
88            ui_warn "${prefix}/etc/boxbackup/bbstored.conf is missing!"
89            ui_msg "You need to run 'bbstored-config' to create it."
90            ui_msg "See the documentation on server setup for details:"
91            #ui_msg "  file://${prefix}/share/doc/boxbackup/server.html"
92            ui_msg "  http://www.boxbackup.org/server.html"
93        }
94    }
95    if {![file exists ${prefix}/etc/boxbackup/bbackupd.conf]} {
96        ui_warn "${prefix}/etc/boxbackup/bbackupd.conf is missing!"
97        ui_msg "You need to run 'bbackupd-config' to create it."
98        ui_msg "See the documentation on client setup for details:"
99        #ui_msg "  file://${prefix}/share/doc/boxbackup/client.html"
100        ui_msg "  http://www.boxbackup.org/client.html"
101    }
102}
103
104test.run        yes
105
106platform darwin {
107    startupitem.create          yes
108    startupitem.name            BoxBackup
109    startupitem.start           "cd ${prefix}/etc/boxbackup"
110    if {[variant_isset server]} {
111        startupitem.start-append    "\[ -f \"${prefix}/etc/boxbackup/bbstored.conf\" \] \\"
112        startupitem.start-append    "\t&& \[ -f \"${prefix}/etc/boxbackup/raidfile.conf\" \] \\"
113        startupitem.start-append    "\t&& ${prefix}/sbin/bbstored"
114    }
115    startupitem.start-append    "\[ -f \"${prefix}/etc/boxbackup/bbackupd.conf\" \] \\"
116    startupitem.start-append    "\t&& ${prefix}/sbin/bbackupd"
117    startupitem.stop            "/usr/bin/killall -SIGUSR1 bbackupd"
118    if {[variant_isset server]} {
119        startupitem.stop-append "/usr/bin/killall -SIGUSR1 bbstored"
120    }
121}
122
Note: See TracBrowser for help on using the repository browser.