# $NetBSD: Makefile.common,v 1.1.1.1 2004/11/06 16:17:38 mjl Exp $ # DISTNAME= bacula-1.36.0 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bacula/} MAINTAINER= mjl@netbsd.org HOMEPAGE= http://www.bacula.org/ COMMENT= Network Backup Solution .include "Makefile.options" USE_BUILDLINK3= yes USE_PKGLOCALEDIR= yes USE_PKGINSTALL= yes GNU_CONFIGURE= yes PKG_SYSCONFSUBDIR?= bacula BACULA_PIDDIR?= /var/run/bacula BACULA_WORKINGDIR?= /var/spool/bacula BACULA_GROUP?= bacula BACULA_DIR_USER?= bacula-dir BACULA_SD_USER?= bacula-sd OWN_DIRS_PERMS= ${BACULA_PIDDIR} root ${BACULA_GROUP} 770 OWN_DIRS_PERMS+= ${BACULA_WORKINGDIR} root ${BACULA_GROUP} 770 FILES_SUBST+= BACULA_ETCDIR=${PKG_SYSCONFDIR} FILES_SUBST+= BACULA_PIDDIR=${BACULA_PIDDIR} FILES_SUBST+= BACULA_GROUP=${BACULA_GROUP} FILES_SUBST+= BACULA_DIR_USER=${BACULA_DIR_USER} FILES_SUBST+= BACULA_SD_USER=${BACULA_SD_USER} CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} CONFIGURE_ARGS+= --with-scriptdir=${PREFIX}/libexec/bacula CONFIGURE_ARGS+= --with-working-dir=${BACULA_WORKINGDIR} CONFIGURE_ARGS+= --with-pid-dir=${BACULA_PIDDIR} CONFIGURE_ARGS+= --with-readline=${PREFIX}/include/readline CONFIGURE_ARGS+= --with-dir-user=${BACULA_DIR_USER} --with-dir-group=${BACULA_GROUP} CONFIGURE_ARGS+= --with-sd-user=${BACULA_SD_USER} --with-sd-group=${BACULA_GROUP} .if !empty(PKG_OPTIONS:Mcatalog-sqlite) CONFIGURE_ARGS+= --with-sqlite=${PREFIX} BACULA_DB= sqlite .endif .if !empty(PKG_OPTIONS:Mcatalog-pgsql) CONFIGURE_ARGS+= -with-postgresql=${PREFIX} BACULA_DB= postgresql .endif .include "../../mk/bsd.prefs.mk" .if ${OPSYS} == "Linux" CONFIGURE_ARGS+= --enable-smartalloc .endif PTHREAD_OPTS+= require PKG_GROUPS= ${BACULA_GROUP} PKG_USERS= ${BACULA_DIR_USER}:${BACULA_GROUP} PKG_USERS+= ${BACULA_SD_USER}:${BACULA_GROUP} PLIST_SUBST+= BACULA_DB=${BACULA_DB} EXAMPLESDIR= ${PREFIX}/share/examples/bacula CONF_FILES= ${EXAMPLESDIR}/bacula-dir.conf ${PKG_SYSCONFDIR}/bacula-dir.conf CONF_FILES+= ${EXAMPLESDIR}/bacula-fd.conf ${PKG_SYSCONFDIR}/bacula-fd.conf CONF_FILES+= ${EXAMPLESDIR}/bacula-sd.conf ${PKG_SYSCONFDIR}/bacula-sd.conf CONF_FILES+= ${EXAMPLESDIR}/bconsole.conf ${PKG_SYSCONFDIR}/bconsole.conf RCD_SCRIPTS= bacula bacula-dir bacula-sd bacula-fd pre-install: ${MKDIR} ${EXAMPLESDIR} .if !empty(PKG_OPTIONS:Mcatalog-sqlite) .include "../../databases/sqlite/buildlink3.mk" .endif .if !empty(PKG_OPTIONS:Mcatalog-pgsql) .include "../../databases/postgresql74-lib/buildlink3.mk" .endif .include "../../devel/zlib/buildlink3.mk" .include "../../security/tcp_wrappers/buildlink3.mk" .include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.pkg.install.mk" .include "../../mk/bsd.pkg.mk"