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

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

sysutils/boxbackup: update to 0.11rc5; note that the config directory has been renamed

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