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

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

bacula: Update license.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 6.3 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 103300 2013-02-21 02:51:57Z macsforever2000@macports.org $
3
4PortSystem          1.0
5
6name                bacula
7version             5.2.13
8categories          sysutils
9platforms           darwin
10license             FDL GPL-2 LGPL
11maintainers         macsforever2000 googlemail.com:robertoschwald
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  bcc168143c0eec5cb5e983f765935534379f4fcf \
22                    sha256  a4bed458bf001889bd06bf31671b5d9908055a1d1e8113fd750ae4d326607ad8
23
24depends_build       port:pkgconfig
25depends_lib         port:gawk \
26                    port:gettext \
27                    port:libiconv \
28                    port:ncurses \
29                    port:openssl \
30                    port:tcp_wrappers \
31                    port:zlib
32
33# Comment out patchfiles in case they are needed in the future or for the non-client version which is completely untested at this point
34#                patch-configure.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
63configure.cppflags-append   -I${prefix}/ncurses
64configure.ldflags           ""
65
66destroot.keepdirs   ${destroot}${prefix}/var/run/subsys \
67                    ${destroot}${prefix}/var/bacula/working
68
69# Don't overwrite preference files
70post-destroot {
71    file rename ${destroot}${prefix}/etc/bacula/bacula-fd.conf ${destroot}${prefix}/etc/bacula/bacula-fd.conf.example
72    file rename ${destroot}${prefix}/etc/bacula/bconsole.conf ${destroot}${prefix}/etc/bacula/bconsole.conf.example
73    file rename ${destroot}${prefix}/etc/bacula/mtx-changer.conf ${destroot}${prefix}/etc/bacula/mtx-changer.conf.example
74}
75
76startupitem.create  yes
77startupitem.init    "BIN=${prefix}/sbin/bacula-fd\nPID=${prefix}/var/run/bacula-fd.*.pid"
78startupitem.start   "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-fd.conf"
79startupitem.stop    "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"
80
81variant client_only conflicts mysql5 postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client (bacula-fd) only" {
82    configure.args-append --enable-client-only
83}
84
85variant console_bat description "Install BAT console GUI application" {
86    depends_build-append  port:tcp_wrappers \
87                          port:makeicns
88    depends_lib-append    port:qt4-mac \
89                          port:qwt52
90    configure.args-append --enable-bat
91    post-patch {
92        system "makeicns -in ${worksrcpath}/src/qt-console/images/bat_icon.png -out ${worksrcpath}/src/qt-console/images/bat_icon.icns"
93    }
94    post-destroot {
95        file rename ${destroot}${prefix}/etc/bacula/bat.conf ${destroot}${prefix}/etc/bacula/bat.conf.example
96        # for now, copy manually until upstream provider fixes bat.app install routines
97        xinstall -m 755 -d ${destroot}${applications_dir}
98        copy ${worksrcpath}/src/qt-console/bat.app ${destroot}${applications_dir}/Bacula-BAT.app
99    }
100    notes "To use the Bacula BAT GUI, you'll need to configure \"${prefix}/etc/bacula/bat.conf\"."
101}
102
103variant mysql5 conflicts client_only postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client and server with mysql 5 backend" {
104    depends_lib-append    path:bin/mysql_config5:mysql5
105    configure.args-append --with-mysql
106    configure.args-delete --without-mysql
107}
108
109variant postgresql83 conflicts mysql5 postgresql84 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.3 backend" {
110    depends_lib-append    port:postgresql83
111    configure.args-append --with-postgresql
112    configure.args-delete --without-postgresql
113    configure.env-append  PATH=${prefix}/lib/postgresql83/bin:$env(PATH)
114}
115
116variant postgresql84 conflicts mysql5 postgresql83 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.4 backend" {
117    depends_lib-append    port:postgresql84
118    configure.args-append --with-postgresql
119    configure.args-delete --without-postgresql
120    configure.env-append  PATH=${prefix}/lib/postgresql84/bin:$env(PATH)
121}
122
123variant sqlite2 conflicts client_only sqlite3 mysql5 postgresql83 postgresql84 description "Install bacula client and server with sqlite 2 backend" {
124    depends_lib-append    port:sqlite2
125    configure.args-append --with-sqlite=${prefix}
126    configure.args-delete --without-sqlite
127}
128
129variant sqlite3 conflicts client_only sqlite2 mysql5 postgresql83 postgresql84 description "Install bacula client and server with sqlite 3 backend" {
130    depends_lib-append    port:sqlite3
131    configure.args-append --with-sqlite3=${prefix}
132    configure.args-delete --without-sqlite3
133}
134
135if {![variant_isset mysql5] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset sqlite2] && ![variant_isset sqlite3]} {
136    default_variants +client_only
137}
138
139livecheck.type           regex
140livecheck.url            http://sourceforge.net/projects/bacula/files/
141livecheck.regex          {bacula-([0-9\.]+)\.tar\.gz}
Note: See TracBrowser for help on using the repository browser.