source: trunk/dports/sysutils/bacula/Portfile @ 99718

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

bacula: whitespace.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.5 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 99718 2012-11-15 00:03:06Z macsforever2000@macports.org $
3
4PortSystem          1.0
5
6name                bacula
7version             5.2.12
8categories          sysutils
9platforms           darwin
10license             GPL
11maintainers         macsforever2000
12
13description         network based backup program
14long_description    Bacula is a set of computer programs that permit you to \
15                    manage backup, recovery, and verification of computer data across \
16                    a network of computers of different kinds.
17
18homepage            http://www.bacula.org/
19master_sites        sourceforge
20
21checksums           rmd160  dd5b9f457a524acd9cdbbe0c4842670c4ee5bd5a \
22                    sha256  360435634e28881b3fedb0dc1901b9c9be1895ce1e39c9737262b25f44513887
23
24depends_lib         port:gawk \
25                    port:gettext \
26                    port:libiconv \
27                    port:ncurses \
28                    port:openssl \
29                    port:tcp_wrappers \
30                    port:zlib
31
32# Comment out patchfiles in case they are needed in the future or for the non-client version which is completely untested at this point
33#                patch-configure.diff \
34#                patch-base64-typecast.diff
35#post-patch {
36#                 reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure
37#}
38
39configure.ccache    no
40configure.args      --mandir=${prefix}/share/man \
41                    --docdir=${prefix}/share/doc/bacula \
42                    --datarootdir=${prefix}/share \
43                    --with-pid-dir=${prefix}/var/run \
44                    --with-subsys-dir=${prefix}/var/run/subsys \
45                    --sysconfdir=${prefix}/etc/${name} \
46                    --with-libintl-prefix=${prefix} \
47                    --with-openssl=${prefix} \
48                    --with-libiconv-prefix=${prefix} \
49                    --with-readline=${prefix} \
50                    --with-archivedir=/var/tmp \
51                    --with-included-gettext=${prefix} \
52                    --enable-smartalloc \
53                    --enable-largefile \
54                    --without-sqlite \
55                    --without-sqlite3 \
56                    --without-postgresql \
57                    --without-mysql \
58                    --disable-gnome \
59                    --disable-wx-console \
60                    --disable-tray-monitor \
61                    --with-tcp-wrappers \
62                    ac_cv_lib_ssl_EVP_PKEY_encrypt_old=yes
63
64# The ac_cv_lib_ssl_EVP_PKEY_encrypt_old=yes line above is for openssl 1.0
65# to get around an apparent bug in bacula
66
67configure.cppflags-append   -I${prefix}/ncurses
68configure.ldflags           ""
69
70destroot.keepdirs   ${destroot}${prefix}/var/run/subsys \
71                    ${destroot}${prefix}/var/bacula/working
72
73# Don't overwrite preference files
74post-destroot {
75    file rename ${destroot}${prefix}/etc/bacula/bacula-fd.conf ${destroot}${prefix}/etc/bacula/bacula-fd.conf.example
76    file rename ${destroot}${prefix}/etc/bacula/bconsole.conf ${destroot}${prefix}/etc/bacula/bconsole.conf.example
77    file rename ${destroot}${prefix}/etc/bacula/mtx-changer.conf ${destroot}${prefix}/etc/bacula/mtx-changer.conf.example
78}
79
80startupitem.create  yes
81startupitem.init    "BIN=${prefix}/sbin/bacula-fd\nPID=${prefix}/var/run/bacula-fd.*.pid"
82startupitem.start   "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-fd.conf"
83startupitem.stop    "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"
84
85variant client_only conflicts mysql5 postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client (bacula-fd) only" {
86    configure.args-append --enable-client-only
87}
88
89variant console_bat description "Install BAT console GUI application" {
90    patchfiles            patch-qt-console-osx.diff
91    depends_build-append  port:tcp_wrappers \
92                          port:makeicns
93    depends_lib-append    port:qt4-mac \
94                          port:qwt52
95    configure.args-append --enable-bat
96    post-patch {
97        system "makeicns -in ${worksrcpath}/src/qt-console/images/bat_icon.png -out ${worksrcpath}/src/qt-console/images/bat_icon.icns"
98    }
99    post-destroot {
100        file rename ${destroot}${prefix}/etc/bacula/bat.conf ${destroot}${prefix}/etc/bacula/bat.conf.example
101        # for now, copy manually until upstream provider fixes bat.app install routines
102        xinstall -m 755 -d ${destroot}${applications_dir}
103        copy ${worksrcpath}/src/qt-console/bat.app ${destroot}${applications_dir}/Bacula-BAT.app
104    }
105    notes "To use the Bacula BAT GUI, you'll need to configure \"${prefix}/etc/bacula/bat.conf\"."
106}
107
108variant mysql5 conflicts client_only postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client and server with mysql 5 backend" {
109    depends_lib-append    path:bin/mysql_config5:mysql5
110    configure.args-append --with-mysql
111    configure.args-delete --without-mysql
112}
113
114variant postgresql83 conflicts mysql5 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
121variant postgresql84 conflicts mysql5 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
128variant sqlite2 conflicts client_only sqlite3 mysql5 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
134variant sqlite3 conflicts client_only sqlite2 mysql5 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
140if {![variant_isset mysql5] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset sqlite2] && ![variant_isset sqlite3]} {
141    default_variants +client_only
142}
143
144livecheck.type           regex
145livecheck.url            http://sourceforge.net/projects/bacula/files/
146livecheck.regex          {bacula-([0-9\.]+)\.tar\.gz}
Note: See TracBrowser for help on using the repository browser.