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

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

bacula: Update to version 5.2.10. Fix build on Mountain Lion.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.4 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 97162 2012-08-28 14:46:30Z macsforever2000@macports.org $
3
4PortSystem 1.0
5
6name             bacula
7version          5.2.10
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           sha256  51f311e6c51d6c9575ca458cd63198c6984eeaaff4ce6f334ff82bc999b8b360 \
22                    rmd160  6e3229d3ed1cf1dde8669617b1577f8d94cf96c8
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#patchfiles       patch-configure.diff \
34#                 patch-base64-typecast.diff
35
36#post-patch {
37#                 reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure
38#}
39
40configure.ccache no
41configure.args   --mandir=${prefix}/share/man \
42                 --docdir=${prefix}/share/doc/bacula \
43                 --datarootdir=${prefix}/share \
44                 --with-pid-dir=${prefix}/var/run \
45                 --with-subsys-dir=${prefix}/var/run/subsys \
46                 --sysconfdir=${prefix}/etc/${name} \
47                 --with-libintl-prefix=${prefix} \
48                 --with-openssl=${prefix} \
49                 --with-libiconv-prefix=${prefix} \
50                 --with-readline=${prefix} \
51                 --with-archivedir=/var/tmp \
52                 --with-included-gettext=${prefix} \
53                 --enable-smartalloc \
54                 --enable-largefile \
55                 --without-sqlite \
56                 --without-sqlite3 \
57                 --without-postgresql \
58                 --without-mysql \
59                 --disable-gnome \
60                 --disable-wx-console \
61                 --disable-tray-monitor \
62                 --with-tcp-wrappers \
63                 ac_cv_lib_ssl_EVP_PKEY_encrypt_old=yes
64
65# The ac_cv_lib_ssl_EVP_PKEY_encrypt_old=yes line above is for openssl 1.0
66# to get around an apparent bug in bacula
67
68configure.cppflags-append   -I${prefix}/ncurses
69configure.ldflags           ""
70
71destroot.keepdirs   ${destroot}${prefix}/var/run/subsys \
72                    ${destroot}${prefix}/var/bacula/working
73
74# Don't overwrite preference files
75post-destroot {
76  file rename ${destroot}${prefix}/etc/bacula/bacula-fd.conf ${destroot}${prefix}/etc/bacula/bacula-fd.conf.example
77  file rename ${destroot}${prefix}/etc/bacula/bconsole.conf ${destroot}${prefix}/etc/bacula/bconsole.conf.example
78  file rename ${destroot}${prefix}/etc/bacula/mtx-changer.conf ${destroot}${prefix}/etc/bacula/mtx-changer.conf.example
79}
80
81startupitem.create  yes
82startupitem.init    "BIN=${prefix}/sbin/bacula-fd\nPID=${prefix}/var/run/bacula-fd.*.pid"
83startupitem.start   "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-fd.conf"
84startupitem.stop    "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"
85
86variant client_only conflicts mysql5 postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client (bacula-fd) only" {
87  configure.args-append --enable-client-only
88}
89
90variant mysql5 conflicts client_only postgresql83 postgresql84 sqlite2 sqlite3 description "Install bacula client and server with mysql 5 backend" {
91  depends_lib-append    path:bin/mysql_config5:mysql5
92  configure.args-append --with-mysql
93  configure.args-delete --without-mysql
94}
95
96variant postgresql83 conflicts mysql5 postgresql84 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.3 backend" {
97  depends_lib-append    port:postgresql83
98  configure.args-append --with-postgresql
99  configure.args-delete --without-postgresql
100  configure.env-append PATH=${prefix}/lib/postgresql83/bin:$env(PATH)
101}
102
103variant postgresql84 conflicts mysql5 postgresql83 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.4 backend" {
104  depends_lib-append    port:postgresql84
105  configure.args-append --with-postgresql
106  configure.args-delete --without-postgresql
107  configure.env-append PATH=${prefix}/lib/postgresql84/bin:$env(PATH)
108}
109
110variant sqlite2 conflicts client_only sqlite3 mysql5 postgresql83 postgresql84 description "Install bacula client and server with sqlite 2 backend" {
111  depends_lib-append    port:sqlite2
112  configure.args-append --with-sqlite=${prefix}
113  configure.args-delete --without-sqlite
114}
115
116variant sqlite3 conflicts client_only sqlite2 mysql5 postgresql83 postgresql84 description "Install bacula client and server with sqlite 3 backend" {
117  depends_lib-append    port:sqlite3
118  configure.args-append --with-sqlite3=${prefix}
119  configure.args-delete --without-sqlite3
120}
121
122if {![variant_isset mysql5] && ![variant_isset postgresql83] && ![variant_isset postgresql84] && ![variant_isset sqlite2] && ![variant_isset sqlite3]} {
123  default_variants +client_only
124}
125
126livecheck.type          regex
127livecheck.url           ${homepage}en/?page=downloads
128livecheck.regex         bacula-(\[0-9.\]\\.\[0-9.\]\\.\[0-9.\]).tar.gz
Note: See TracBrowser for help on using the repository browser.