diff options
author | wiz <wiz> | 2005-10-31 09:45:47 +0000 |
---|---|---|
committer | wiz <wiz> | 2005-10-31 09:45:47 +0000 |
commit | 13ee5c64195d9448b84bf25fef527077c29f35da (patch) | |
tree | 7671fc82de4976af0bfc6a616d831bfca2bdee06 | |
parent | 8d161be073e7080601e1c2765e0dea760847b8f8 (diff) | |
download | pkgsrc-13ee5c64195d9448b84bf25fef527077c29f35da.tar.gz |
Split off more stuff into Makefile.common, for bacula-client.
Add group argument to bacula-fd script.
From Geert Hendrickx.
-rw-r--r-- | sysutils/bacula/Makefile | 40 | ||||
-rw-r--r-- | sysutils/bacula/Makefile.common | 51 | ||||
-rw-r--r-- | sysutils/bacula/files/bacula-fd.sh | 2 | ||||
-rw-r--r-- | sysutils/bacula/options.mk | 10 |
4 files changed, 55 insertions, 48 deletions
diff --git a/sysutils/bacula/Makefile b/sysutils/bacula/Makefile index d0581ae669c..f600d82d721 100644 --- a/sysutils/bacula/Makefile +++ b/sysutils/bacula/Makefile @@ -1,5 +1,43 @@ -# $NetBSD: Makefile,v 1.4 2005/10/14 15:44:51 wiz Exp $ +# $NetBSD: Makefile,v 1.5 2005/10/31 09:45:47 wiz Exp $ + +CONFLICTS+= bacula-client-[0-9]* + +.include "options.mk" + +.if !empty(PKG_OPTIONS:Mcatalog-sqlite) +. include "../../databases/sqlite/buildlink3.mk" +CONFIGURE_ARGS+= --with-sqlite=${BUILDLINK_PREFIX.sqlite} +BACULA_DB= sqlite +.endif +.if !empty(PKG_OPTIONS:Mcatalog-pgsql) +. include "../../mk/pgsql.buildlink3.mk" +CONFIGURE_ARGS+= --with-postgresql=${PGSQL_PREFIX} +BACULA_DB= postgresql +.endif +.if !empty(PKG_OPTIONS:Mcatalog-mysql) +. include "../../mk/mysql.buildlink3.mk" +CONFIGURE_ARGS+= --with-mysql=${PREFIX} +BACULA_DB= mysql +.endif + +PLIST_SUBST+= BACULA_DB=${BACULA_DB} + +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} + +PKG_USERS= ${BACULA_DIR_USER}:${BACULA_GROUP} +PKG_USERS+= ${BACULA_SD_USER}:${BACULA_GROUP} + +OWN_DIRS_PERMS= ${BACULA_PIDDIR} root ${BACULA_GROUP} 770 +OWN_DIRS_PERMS+= ${BACULA_WORKINGDIR} root ${BACULA_GROUP} 770 + +CONF_FILES+= ${EXAMPLESDIR}/bacula-dir.conf ${PKG_SYSCONFDIR}/bacula-dir.conf +CONF_FILES+= ${EXAMPLESDIR}/bacula-sd.conf ${PKG_SYSCONFDIR}/bacula-sd.conf + +RCD_SCRIPTS= bacula bacula-dir bacula-sd bacula-fd .include "Makefile.common" +PKGREVISION= 2 + .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/bacula/Makefile.common b/sysutils/bacula/Makefile.common index d945c7cc9c8..20c86d345cb 100644 --- a/sysutils/bacula/Makefile.common +++ b/sysutils/bacula/Makefile.common @@ -1,22 +1,24 @@ -# $NetBSD: Makefile.common,v 1.12 2005/10/16 11:59:35 wiz Exp $ -# +# $NetBSD: Makefile.common,v 1.13 2005/10/31 09:45:47 wiz Exp $ DISTNAME= bacula-1.36.3 -PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=bacula/} -MAINTAINER= tech-pkg@NetBSD.org +MAINTAINER= geert.hendrickx@ua.ac.be HOMEPAGE= http://www.bacula.org/ -COMMENT= Network Backup Solution - -.include "options.mk" +COMMENT= The Network Backup Solution USE_LANGUAGES+= c++ USE_PKGLOCALEDIR= yes USE_PKGINSTALL= yes GNU_CONFIGURE= yes +BACULA_GROUP?= bacula +BACULA_DIR_USER?= bacula-dir +BACULA_SD_USER?= bacula-sd + +BUILD_DEFS= BACULA_DIR_USER BACULA_SD_USER BACULA_GROUP + PKG_SYSCONFSUBDIR?= bacula BACULA_PIDDIR?= ${VARBASE}/run/bacula BACULA_WORKINGDIR?= ${VARBASE}/spool/bacula @@ -35,23 +37,8 @@ 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) -. include "../../databases/sqlite/buildlink3.mk" -CONFIGURE_ARGS+= --with-sqlite=${BUILDLINK_PREFIX.sqlite} -BACULA_DB= sqlite -.endif -.if !empty(PKG_OPTIONS:Mcatalog-pgsql) -. include "../../mk/pgsql.buildlink3.mk" -CONFIGURE_ARGS+= --with-postgresql=${PGSQL_PREFIX} -BACULA_DB= postgresql -.endif -.if !empty(PKG_OPTIONS:Mcatalog-mysql) -. include "../../mk/mysql.buildlink3.mk" -CONFIGURE_ARGS+= --with-mysql=${PREFIX} -BACULA_DB= mysql -.endif + +PKG_GROUPS= ${BACULA_GROUP} .include "../../mk/bsd.prefs.mk" .if ${OPSYS} == "Linux" @@ -61,19 +48,9 @@ CONFIGURE_ARGS+= --enable-smartalloc PTHREAD_OPTS+= require PTHREAD_AUTO_VARS= yes -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 +EXAMPLESDIR= ${PREFIX}/share/examples/bacula +CONF_FILES+= ${EXAMPLESDIR}/bacula-fd.conf ${PKG_SYSCONFDIR}/bacula-fd.conf +CONF_FILES+= ${EXAMPLESDIR}/bconsole.conf ${PKG_SYSCONFDIR}/bconsole.conf pre-install: ${INSTALL_DATA_DIR} ${EXAMPLESDIR} diff --git a/sysutils/bacula/files/bacula-fd.sh b/sysutils/bacula/files/bacula-fd.sh index f0e8b87f172..96da108f83f 100644 --- a/sysutils/bacula/files/bacula-fd.sh +++ b/sysutils/bacula/files/bacula-fd.sh @@ -12,7 +12,7 @@ rcvar=$name command="@PREFIX@/sbin/bacula-fd" required_files="@BACULA_ETCDIR@/bacula-fd.conf" pidfile="@BACULA_PIDDIR@/bacula-fd.9102.pid" -command_args="-c ${required_files}" +command_args="-c ${required_files} -g @BACULA_GROUP@" if [ -f /etc/rc.subr ]; then load_rc_config $name diff --git a/sysutils/bacula/options.mk b/sysutils/bacula/options.mk index a88fc983025..b8af5bd8c1e 100644 --- a/sysutils/bacula/options.mk +++ b/sysutils/bacula/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.3 2005/10/10 15:27:45 wiz Exp $ +# $NetBSD: options.mk,v 1.4 2005/10/31 09:45:47 wiz Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.bacula PKG_OPTIONS_REQUIRED_GROUPS= database @@ -6,11 +6,3 @@ PKG_OPTIONS_GROUP.database= catalog-sqlite catalog-pgsql catalog-mysql PKG_SUGGESTED_OPTIONS= catalog-sqlite .include "../../mk/bsd.options.mk" - -# Other options - -BACULA_GROUP?= bacula -BACULA_DIR_USER?= bacula-dir -BACULA_SD_USER?= bacula-sd - -BUILD_DEFS= BACULA_DIR_USER BACULA_SD_USER BACULA_GROUP |