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

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

Fix for doc directory.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.1 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 58451 2009-09-28 21:04:16Z macsforever2000@macports.org $
3
4PortSystem 1.0
5
6name             bacula
7version          3.0.2
8revision         1
9categories       sysutils
10platforms        darwin
11license          GPL
12maintainers      macsforever2000
13
14description      network based backup program
15long_description "Bacula is a set of computer programs that permit you to \
16                 manage backup, recovery, and verification of computer data across \
17                 a network of computers of different kinds."
18
19homepage         http://www.bacula.org/
20master_sites     sourceforge
21
22checksums        md5    52f4bc25d8988dffcff429bb5e1ee81b \
23                 sha1   a397d953a51a88206f7613626265c60bdf77198e \
24                 rmd160 e21ca4296a439a2ba804cb3b2fc0e2e2996f41b1
25
26depends_build    port:gawk
27depends_lib      port:zlib \
28                 port:openssl \
29                 port:libiconv \
30                 port:gettext \
31                 port:ncurses
32
33patchfiles       patch-configure.diff
34
35post-patch {
36                 reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/configure
37}
38
39configure.args   --mandir=${prefix}/share/man \
40                 --docdir=${prefix}/share/doc/bacula \
41                 --datarootdir=${prefix}/share \
42                 --with-pid-dir=${prefix}/var/run \
43                 --with-subsys-dir=${prefix}/var/run/subsys \
44                 --sysconfdir=${prefix}/etc/${name} \
45                 --with-libintl-prefix=${prefix} \
46                 --with-openssl=${prefix} \
47                 --with-libiconv-prefix=${prefix} \
48                 --with-readline=${prefix} \
49                 --with-archivedir=/var/tmp \
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
60configure.cppflags-append   -I${prefix}/ncurses
61configure.ldflags           ""
62
63destroot.keepdirs   ${destroot}${prefix}/var/run/subsys \
64                    ${destroot}${prefix}/var/bacula/working
65
66# Don't overwrite preference files
67platform darwin {
68  if {${os.major} < 10} {
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
76  if {${os.major} == 10} {
77    post-destroot {
78      file copy ${worksrcpath}/src/filed/bacula-fd.conf ${destroot}${prefix}/etc/bacula/bacula-fd.conf.example
79      file copy ${worksrcpath}/src/console/bconsole.conf ${destroot}${prefix}/etc/bacula/bconsole.conf.example
80      file rename ${destroot}${prefix}/etc/bacula/mtx-changer.conf ${destroot}${prefix}/etc/bacula/mtx-changer.conf.example
81    }
82  }
83}
84
85startupitem.create  yes
86startupitem.init    "BIN=${prefix}/sbin/bacula-fd\nPID=${prefix}/var/run/bacula-fd.*.pid"
87startupitem.start   "\[ -x \${BIN} \] && \${BIN} -c ${prefix}/etc/bacula/bacula-fd.conf"
88startupitem.stop    "\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"
89
90variant client_only conflicts mysql4 mysql5 postgresql83 sqlite2 sqlite3 description "Install bacula client (bacula-fd) only" {
91  configure.args-append --enable-client-only
92}
93
94variant mysql4 conflicts client_only mysql5 postgresql83 sqlite2 sqlite3 description "Install bacula client and server with mysql 4 backend" {
95  depends_lib-append    port:mysql4
96  configure.args-append --with-mysql
97  configure.args-delete --without-mysql
98}
99
100variant mysql5 conflicts client_only mysql4 postgresql83 sqlite2 sqlite3 description "Install bacula client and server with mysql 5 backend" {
101  depends_lib-append    path:bin/mysql_config5:mysql5
102  configure.args-append --with-mysql
103  configure.args-delete --without-mysql
104}
105
106variant postgresql83 conflicts mysql4 mysql5 sqlite2 sqlite3 client_only description "Install bacula client and server with postgresql 8.3 backend" {
107  depends_lib-append    port:postgresql83
108  configure.args-append --with-postgresql
109  configure.args-delete --without-postgresql
110  configure.env-append PATH=${prefix}/lib/postgresql83/bin:$env(PATH)
111}
112
113variant sqlite2 conflicts client_only sqlite3 mysql4 mysql5 postgresql83 description "Install bacula client and server with sqlite 2 backend" {
114  depends_lib-append    port:sqlite2
115  configure.args-append --with-sqlite=${prefix}
116  configure.args-delete --without-sqlite
117}
118
119variant sqlite3 conflicts client_only sqlite2 mysql4 mysql5 postgresql83 description "Install bacula client and server with sqlite 3 backend" {
120  depends_lib-append    port:sqlite3
121  configure.args-append --with-sqlite3=${prefix}
122  configure.args-delete --without-sqlite3
123}
124
125if {![variant_isset mysql4] && ![variant_isset mysql5] && ![variant_isset postgresql83] && ![variant_isset sqlite2] && ![variant_isset sqlite3]} {
126  default_variants +client_only
127}
Note: See TracBrowser for help on using the repository browser.