Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/samba.mk
# Handle dependency on samba | # Handle dependency on samba | ||||
# | # | ||||
# Feature: samba | # Feature: samba | ||||
# Usage: USES=samba or USES=samba:ARGS | # Usage: USES=samba or USES=samba:ARGS | ||||
# Valid ARGS: build, env, lib, run | # Valid ARGS: build, env, lib, run | ||||
# default is build,run (implicit) | # default is build,run (implicit) | ||||
# | # | ||||
# When subpackages are available this can be more granular | # When subpackages are available this can be more granular | ||||
# | # | ||||
.if !defined(_INCLUDE_USES_SAMBA_MK) | .if !defined(_INCLUDE_USES_SAMBA_MK) | ||||
_INCLUDE_USES_SAMBA_MK= yes | _INCLUDE_USES_SAMBA_MK= yes | ||||
.if !${samba_ARGS} | . if !${samba_ARGS} | ||||
samba_ARGS= build run | samba_ARGS= build run | ||||
.endif | . endif | ||||
.if ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} | . if ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} | ||||
IGNORE= USES=samba has invalid arguments: ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} | IGNORE= USES=samba has invalid arguments: ${samba_ARGS:Nbuild:Nenv:Nlib:Nrun} | ||||
.endif | . endif | ||||
SAMBAPORT= net/samba${SAMBA_DEFAULT:S/.//} | SAMBAPORT= net/samba${SAMBA_DEFAULT:S/.//} | ||||
SAMBAINCLUDES= ${LOCALBASE}/include/samba4 | SAMBAINCLUDES= ${LOCALBASE}/include/samba4 | ||||
.if ${SAMBA_DEFAULT} == 4.12 || ${SAMBA_DEFAULT} == 4.13 | . if ${SAMBA_DEFAULT} == 4.12 || ${SAMBA_DEFAULT} == 4.13 | ||||
SAMBALIBS= ${LOCALBASE}/lib/samba4 | SAMBALIBS= ${LOCALBASE}/lib/samba4 | ||||
.else | . else | ||||
IGNORE= Invalid version of samba: ${SAMBA_DEFAULT} | IGNORE= Invalid version of samba: ${SAMBA_DEFAULT} | ||||
.endif | . endif | ||||
.if ${samba_ARGS:Mbuild} | . if ${samba_ARGS:Mbuild} | ||||
BUILD_DEPENDS+= smbd:${SAMBAPORT} | BUILD_DEPENDS+= smbd:${SAMBAPORT} | ||||
.endif | . endif | ||||
.if ${samba_ARGS:Mlib} | . if ${samba_ARGS:Mlib} | ||||
LIB_DEPENDS+= libsmbclient.so:${SAMBAPORT} | LIB_DEPENDS+= libsmbclient.so:${SAMBAPORT} | ||||
.endif | . endif | ||||
.if ${samba_ARGS:Mrun} | . if ${samba_ARGS:Mrun} | ||||
RUN_DEPENDS+= smbd:${SAMBAPORT} | RUN_DEPENDS+= smbd:${SAMBAPORT} | ||||
.endif | . endif | ||||
.endif | .endif |