Added options framework.

This commit is contained in:
Paul Lecuq 2015-03-15 18:30:05 +00:00 committed by Thomas Klausner
parent ae095383b8
commit 69c3bfe4eb
2 changed files with 57 additions and 1 deletions

View file

@ -15,8 +15,32 @@ USE_PKGLOCALEDIR= yes
USE_TOOLS+= msgfmt
GNU_CONFIGURE= yes
BAREOS_GROUP?= bareos
BAREOS_DIR_USER?= bareos-dir
BAREOS_SD_USER?= bareos-sd
.include "../../mk/bsd.prefs.mk"
.include "../../wip/bareos/options.mk"
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --with-scriptdir=${PREFIX}/libexec/bareos
CONFIGURE_ARGS+= --with-sbin-perm=0755
CONFIGURE_ARGS+= --with-working-dir=${BAREOS_WORKINGDIR}
CONFIGURE_ARGS+= --with-pid-dir=${BAREOS_PIDDIR}
CONFIGURE_ARGS+= --with-readline=${BUILDLINK_PREFIX.editlinereadline}/include/readline
.if ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --enable-smartalloc
.endif
.if ${OPSYS} == "DragonFly"
CONFIGURE_ARGS+= --disable-xattr
.endif
PTHREAD_OPTS+= require
PTHREAD_AUTO_VARS= yes
.include "../../mk/bsd.pkg.mk"
.include "../../mk/readline.buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.include "../../archivers/lzo/buildlink3.mk"

32
bareos/options.mk Normal file
View file

@ -0,0 +1,32 @@
PKG_OPTIONS_VAR= PKG_OPTIONS.bareos
PKG_SUPPORTED_OPTIONS= ssl lzo
PKG_OPTIONS_REQUIRED_GROUPS= database
PKG_OPTIONS_GROUP.database= catalog-sqlite3 catalog-pgsql catalog-mysql
PKG_SUGGESTED_OPTIONS= ssl catalog-sqlite3
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Mcatalog-sqlite3)
. include "../../databases/sqlite3/buildlink3.mk"
CONFIGURE_ARGS+= --with-sqlite3=${BUILDLINK_PREFIX.sqlite3}
BAREOS_DB= sqlite3
.elif !empty(PKG_OPTIONS:Mcatalog-pgsql)
. include "../../mk/pgsql.buildlink3.mk"
CONFIGURE_ARGS+= --with-postgresql=${PGSQL_PREFIX}
BAREOS_DB= postgresql
.elif !empty(PKG_OPTIONS:Mcatalog-mysql)
. include "../../mk/mysql.buildlink3.mk"
CONFIGURE_ARGS+= --with-mysql=${PREFIX}
BAREOS_DB= mysql
.endif
.if !empty(PKG_OPTIONS:Mssl)
. include "../../security/openssl/buildlink3.mk"
CONFIGURE_ARGS+= --with-openssl=${BUILDLINK_PREFIX.openssl}
.else
CONFIGURE_ARGS+= --without-openssl
.endif
.if !empty(PKG_OPTIONS:Mlzo)
. include "../../archivers/lzo/buildlink3.mk"
.endif