diff options
Diffstat (limited to 'security/kanidm/Makefile')
-rw-r--r-- | security/kanidm/Makefile | 60 |
1 files changed, 44 insertions, 16 deletions
diff --git a/security/kanidm/Makefile b/security/kanidm/Makefile index 38a6e4d76654..d26139ca5e75 100644 --- a/security/kanidm/Makefile +++ b/security/kanidm/Makefile @@ -1,6 +1,6 @@ PORTNAME= kanidm DISTVERSIONPREFIX= v -DISTVERSION= 1.6.0 +DISTVERSION= 1.7.3 CATEGORIES= security net MAINTAINER= bofh@FreeBSD.org @@ -23,21 +23,45 @@ server_PKGNAMESUFFIX= -server server_COMMENT= (server only) server_PLIST= ${.CURDIR}/pkg-plist.server -USES= cargo ssl +USES= cargo ssl llvm USE_GITHUB= yes + +MAKE_ENV= LIBCLANG_PATH=${LLVM_PREFIX}/lib + .if ${FLAVOR} == server -USE_RC_SUBR= kanidm_unixd kanidm_unixd_tasks +CARGO_BUILD_ARGS= -p daemon +USE_RC_SUBR= kanidmd .endif .if ${FLAVOR} == client CARGO_BUILD_ARGS= -p kanidm_tools -p kanidm_unix_int -p nss_kanidm -p pam_kanidm +USE_RC_SUBR= kanidm_unixd kanidm_unixd_tasks .endif + CARGO_INSTALL= no CARGO_ENV= KANIDM_BUILD_PROFILE=release_freebsd -CACHEDIR=/var/cache/kanidm-unixd -LIBDIR=/var/lib/kanidm-unixd -RUNDIR=/var/run/kanidm-unixd +CLIENT_CACHEDIR=/var/cache/kanidm-unixd +CLIENT_LIBDIR=/var/lib/kanidm-unixd +CLIENT_RUNDIR=/var/run/kanidm-unixd + +SERVER_LIBDIR=/var/lib/kanidmd +SERVER_RUNDIR=/var/run/kanidmd + +.if ${FLAVOR} == server +USERS= kanidmd +GROUPS= kanidmd + +SUB_LIST= USER=${USERS} \ + GROUP=${GROUPS} \ + ETCDIR=${PREFIX}/etc/kanidm \ + RUNDIR=/var/run/kanidmd \ + LIBDIR=/var/lib/kanidmd +.endif + +.if ${FLAVOR} == client +USERS= kanidm +GROUPS= kanidm SUB_LIST= USER=${USERS} \ GROUP=${GROUPS} \ @@ -45,26 +69,30 @@ SUB_LIST= USER=${USERS} \ RUNDIR=/var/run/kanidm-unixd \ CACHEDIR=/var/cache/kanidm-unixd \ LIBDIR=/var/lib/kanidm-unixd - -USERS= ${PORTNAME} -GROUPS= ${PORTNAME} +.endif do-install: +.if ${FLAVOR} == server + ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidmd ${STAGEDIR}${PREFIX}/libexec ${MKDIR} ${STAGEDIR}${ETCDIR} + ${MKDIR} ${STAGEDIR}${SERVER_LIBDIR} + ${MKDIR} ${STAGEDIR}${SERVER_RUNDIR} +.endif + .if ${FLAVOR} == client ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm-unix ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm_ssh_authorizedkeys ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm_ssh_authorizedkeys_direct ${STAGEDIR}${PREFIX}/bin - ${INSTALL_LIB} ${WRKDIR}/target/release/libnss_kanidm.so ${STAGEDIR}${PREFIX}/lib/nss_kanidm.so.1 - ${INSTALL_LIB} ${WRKDIR}/target/release/libpam_kanidm.so ${STAGEDIR}${PREFIX}/lib -.endif -.if ${FLAVOR} == server ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm_unixd ${STAGEDIR}${PREFIX}/libexec ${INSTALL_PROGRAM} ${WRKDIR}/target/release/kanidm_unixd_tasks ${STAGEDIR}${PREFIX}/libexec - ${MKDIR} ${STAGEDIR}${CACHEDIR} - ${MKDIR} ${STAGEDIR}${LIBDIR} - ${MKDIR} ${STAGEDIR}${RUNDIR} + ${INSTALL_LIB} ${WRKDIR}/target/release/libnss_kanidm.so ${STAGEDIR}${PREFIX}/lib/nss_kanidm.so.1 + ${INSTALL_LIB} ${WRKDIR}/target/release/libpam_kanidm.so ${STAGEDIR}${PREFIX}/lib + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${MKDIR} ${STAGEDIR}${CLIENT_CACHEDIR} + ${MKDIR} ${STAGEDIR}${CLIENT_LIBDIR} + ${MKDIR} ${STAGEDIR}${CLIENT_RUNDIR} .endif .include <bsd.port.mk> |