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 146517 2016-03-10 17:49:28Z raimue@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name bacula5 |
---|
7 | set realname bacula |
---|
8 | version 5.2.13 |
---|
9 | revision 2 |
---|
10 | categories sysutils |
---|
11 | platforms darwin |
---|
12 | license {AGPL-3 OpenSSLException} |
---|
13 | maintainers googlemail.com:robertoschwald |
---|
14 | |
---|
15 | description network based backup program |
---|
16 | long_description Bacula is a set of computer programs that permit you to \ |
---|
17 | manage backup, recovery, and verification of computer data across \ |
---|
18 | a network of computers of different kinds. |
---|
19 | |
---|
20 | homepage http://www.bacula.org/ |
---|
21 | master_sites sourceforge:project/bacula/bacula/${version}/ |
---|
22 | |
---|
23 | checksums rmd160 bcc168143c0eec5cb5e983f765935534379f4fcf \ |
---|
24 | sha256 a4bed458bf001889bd06bf31671b5d9908055a1d1e8113fd750ae4d326607ad8 |
---|
25 | |
---|
26 | distname ${realname}-${version} |
---|
27 | |
---|
28 | depends_build port:pkgconfig |
---|
29 | depends_lib port:gawk \ |
---|
30 | port:gettext \ |
---|
31 | port:libiconv \ |
---|
32 | port:ncurses \ |
---|
33 | path:lib/libssl.dylib:openssl \ |
---|
34 | port:tcp_wrappers \ |
---|
35 | port:zlib |
---|
36 | |
---|
37 | configure.ccache no |
---|
38 | configure.args --mandir=${prefix}/share/man \ |
---|
39 | --docdir=${prefix}/share/doc/bacula \ |
---|
40 | --datarootdir=${prefix}/share \ |
---|
41 | --with-pid-dir=${prefix}/var/run \ |
---|
42 | --with-subsys-dir=${prefix}/var/run/subsys \ |
---|
43 | --sysconfdir=${prefix}/etc/${realname} \ |
---|
44 | --with-libintl-prefix=${prefix} \ |
---|
45 | --with-openssl=${prefix} \ |
---|
46 | --with-libiconv-prefix=${prefix} \ |
---|
47 | --with-readline=${prefix} \ |
---|
48 | --with-archivedir=/var/tmp \ |
---|
49 | --with-working-dir=${prefix}/var/bacula/working \ |
---|
50 | --with-included-gettext=${prefix} \ |
---|
51 | --enable-smartalloc \ |
---|
52 | --enable-largefile \ |
---|
53 | --without-sqlite \ |
---|
54 | --without-sqlite3 \ |
---|
55 | --without-postgresql \ |
---|
56 | --without-mysql \ |
---|
57 | --disable-gnome \ |
---|
58 | --disable-wx-console \ |
---|
59 | --disable-tray-monitor \ |
---|
60 | --with-tcp-wrappers |
---|
61 | |
---|
62 | configure.cppflags-append -I${prefix}/ncurses |
---|
63 | configure.ldflags "" |
---|
64 | |
---|
65 | destroot.keepdirs ${destroot}${prefix}/var/run/subsys \ |
---|
66 | ${destroot}${prefix}/var/bacula/working |
---|
67 | |
---|
68 | # Don't overwrite preference files |
---|
69 | post-destroot { |
---|
70 | file rename ${destroot}${prefix}/etc/bacula/bacula-fd.conf ${destroot}${prefix}/etc/bacula/bacula-fd.conf.example |
---|
71 | file rename ${destroot}${prefix}/etc/bacula/bconsole.conf ${destroot}${prefix}/etc/bacula/bconsole.conf.example |
---|
72 | file rename ${destroot}${prefix}/etc/bacula/mtx-changer.conf ${destroot}${prefix}/etc/bacula/mtx-changer.conf.example |
---|
73 | } |
---|
74 | |
---|
75 | startupitem.create yes |
---|
76 | startupitem.init "BIN=${prefix}/sbin/bacula-fd\nPID=${prefix}/var/run/bacula-fd.*.pid" |
---|
77 | startupitem.start "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-fd.conf" |
---|
78 | startupitem.stop "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})" |
---|
79 | |
---|
80 | variant client_only conflicts mysql55 postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client (bacula-fd) only" { |
---|
81 | configure.args-append --enable-client-only |
---|
82 | } |
---|
83 | |
---|
84 | variant console_bat description "Install BAT console GUI application" { |
---|
85 | depends_build-append port:tcp_wrappers \ |
---|
86 | port:makeicns |
---|
87 | depends_lib-append port:qt4-mac \ |
---|
88 | port:qwt52 |
---|
89 | configure.args-append --enable-bat |
---|
90 | post-patch { |
---|
91 | system "makeicns -in ${worksrcpath}/src/qt-console/images/bat_icon.png -out ${worksrcpath}/src/qt-console/images/bat_icon.icns" |
---|
92 | } |
---|
93 | post-destroot { |
---|
94 | file rename ${destroot}${prefix}/etc/bacula/bat.conf ${destroot}${prefix}/etc/bacula/bat.conf.example |
---|
95 | # for now, copy manually until upstream provider fixes bat.app install routines |
---|
96 | xinstall -m 755 -d ${destroot}${applications_dir} |
---|
97 | copy ${worksrcpath}/src/qt-console/bat.app ${destroot}${applications_dir}/Bacula-BAT.app |
---|
98 | } |
---|
99 | notes "To use the Bacula BAT GUI, you'll need to configure \"${prefix}/etc/bacula/bat.conf\"." |
---|
100 | } |
---|
101 | |
---|
102 | variant mysql55 conflicts client_only postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client and server with mysql 5 backend" { |
---|
103 | depends_lib-append port:mysql55 |
---|
104 | configure.args-append --with-mysql=${prefix}/include/mysql55/mysql |
---|
105 | configure.args-delete --without-mysql |
---|
106 | configure.cppflags-append -I${prefix}/include/mysql55/mysql |
---|
107 | |
---|
108 | patchfiles patch-configure-mysql.diff |
---|
109 | post-patch { |
---|
110 | reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure |
---|
111 | } |
---|
112 | } |
---|
113 | |
---|
114 | variant postgresql83 conflicts mysql55 postgresql84 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.3 backend" { |
---|
115 | depends_lib-append port:postgresql83 |
---|
116 | configure.args-append --with-postgresql |
---|
117 | configure.args-delete --without-postgresql |
---|
118 | configure.env-append PATH=${prefix}/lib/postgresql83/bin:$env(PATH) |
---|
119 | } |
---|
120 | |
---|
121 | variant postgresql84 conflicts mysql55 postgresql83 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.4 backend" { |
---|
122 | depends_lib-append port:postgresql84 |
---|
123 | configure.args-append --with-postgresql |
---|
124 | configure.args-delete --without-postgresql |
---|
125 | configure.env-append PATH=${prefix}/lib/postgresql84/bin:$env(PATH) |
---|
126 | } |
---|
127 | |
---|
128 | variant sqlite2 conflicts client_only sqlite3 mysql55 postgresql83 postgresql84 description "Install bacula client and server with sqlite 2 backend" { |
---|
129 | depends_lib-append port:sqlite2 |
---|
130 | configure.args-append --with-sqlite=${prefix} |
---|
131 | configure.args-delete --without-sqlite |
---|
132 | } |
---|
133 | |
---|
134 | variant sqlite3 conflicts client_only sqlite2 mysql55 postgresql83 postgresql84 description "Install bacula client and server with sqlite 3 backend" { |
---|
135 | depends_lib-append port:sqlite3 |
---|
136 | configure.args-append --with-sqlite3=${prefix} |
---|
137 | configure.args-delete --without-sqlite3 |
---|
138 | } |
---|
139 | |
---|
140 | default_variants +console_bat |
---|
141 | |
---|
142 | if {![variant_isset mysql55] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset sqlite2] && ![variant_isset sqlite3]} { |
---|
143 | default_variants-append +client_only |
---|
144 | } |
---|
145 | |
---|
146 | livecheck.type regex |
---|
147 | livecheck.url ${homepage} |
---|
148 | livecheck.regex {Bacula ([0-9\.]+)} |
---|