# $Id: Portfile,v 1.5 2006/05/06 08:51:33 mww Exp $

PortSystem 1.0

name			bacula
version			1.38.9
categories		sysutils
platforms		darwin
maintainers		darwinports@opendarwin.org
description		network based backup program
long_description	Bacula is a set of computer programs that permit you to \
			manage backup, recovery, and verification of computer data across \
			a network of computers of different kinds.

homepage		http://www.bacula.org/
master_sites	sourceforge
checksums		sha1 20a477af1c63adc9a90be9d241bd462b627dc074

depends_lib		port:zlib port:sqlite3 port:openssl port:libiconv port:gettext

configure.args	--mandir=${prefix}/share/man --with-pid-dir=${prefix}/var/run \
				--with-subsys-dir=${prefix}/var/run/subsys \
				--sysconfdir=${prefix}/etc/${name} \
				--with-libintl-prefix=${prefix} --with-openssl=${prefix} \
				--with-libiconv-prefix=${prefix} --with-sqlite3=${prefix} \
				--without-postgresql --without-mysql \
				--disable-gnome --disable-wx-console --disable-tray-monitor 

destroot.keepdirs	${destroot}${prefix}/var/run/subsys \
				${destroot}${prefix}/var/bacula/working

platform darwin 8 {
	configure.env CC=/usr/bin/gcc-4.0 CPP=/usr/bin/cpp-4.0 CXX=/usr/bin/g++-4.0
}

startupitem.create	yes
startupitem.init	\
"BIN=${prefix}/sbin/bacula-fd\nPID=${prefix}/var/run/bacula-fd.*.pid"
startupitem.start	\
"\[ -x \${BIN} \] && \${BIN} start -c ${prefix}/etc/bacula/bacula-fd.conf"
startupitem.stop	\
"\[ -r \${PID} \] && /bin/kill \$(cat \${PID})"

