Changeset View
Changeset View
Standalone View
Standalone View
net/freeradius2/Makefile
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | |||||
RADIUS_GROUP= freeradius | RADIUS_GROUP= freeradius | ||||
USERS= ${RADIUS_USER} | USERS= ${RADIUS_USER} | ||||
GROUPS= ${RADIUS_GROUP} | GROUPS= ${RADIUS_GROUP} | ||||
# Default requirements for rc script | # Default requirements for rc script | ||||
_REQUIRE= NETWORKING SERVERS | _REQUIRE= NETWORKING SERVERS | ||||
OPTIONS_DEFINE= USER KERBEROS HEIMDAL HEIMDAL_PORT LDAP MYSQL \ | OPTIONS_DEFINE= USER KERBEROS HEIMDAL LDAP MYSQL \ | ||||
PGSQL UNIXODBC FIREBIRD PERL PYTHON OCI8 RUBY DHCP \ | PGSQL UNIXODBC FIREBIRD PERL PYTHON OCI8 RUBY DHCP \ | ||||
EXPERIMENTAL UDPFROMTO DEVELOPER EDIR SSL_PORT DOCS | EXPERIMENTAL UDPFROMTO DEVELOPER EDIR SSL_PORT DOCS | ||||
OPTIONS_DEFAULT=USER PERL PYTHON | OPTIONS_DEFAULT=USER PERL PYTHON | ||||
DHCP_DESC= With DHCP support (EXPERIMENTAL) | DHCP_DESC= With DHCP support (EXPERIMENTAL) | ||||
USER_DESC= Run as user freeradius, group freeradius | USER_DESC= Run as user freeradius, group freeradius | ||||
HEIMDAL_DESC= With Heimdal Kerberos support | HEIMDAL_DESC= With Heimdal Kerberos from ports | ||||
HEIMDAL_PORT_DESC= With Heimdal Kerberos from ports | |||||
UNIXODBC_DESC= With unixODBC database support | UNIXODBC_DESC= With unixODBC database support | ||||
FIREBIRD_DESC= With Firebird database support (EXPERIMENTAL) | FIREBIRD_DESC= With Firebird database support (EXPERIMENTAL) | ||||
OCI8_DESC= With Oracle support (currently experimental) | OCI8_DESC= With Oracle support (currently experimental) | ||||
EXPERIMENTAL_DESC= Build experimental modules | EXPERIMENTAL_DESC= Build experimental modules | ||||
UDPFROMTO_DESC= Compile in UDPFROMTO support | UDPFROMTO_DESC= Compile in UDPFROMTO support | ||||
DEVELOPER_DESC= Enable developer options | DEVELOPER_DESC= Enable developer options | ||||
EDIR_DESC= Enable eDirectory support (implies LDAP) | EDIR_DESC= Enable eDirectory support (implies LDAP) | ||||
SSL_PORT_DESC= Use OpenSSL from the ports collection | SSL_PORT_DESC= Use OpenSSL from the ports collection | ||||
.include <bsd.port.options.mk> | .include <bsd.port.options.mk> | ||||
.if ${PORT_OPTIONS:MUSER} | .if ${PORT_OPTIONS:MUSER} | ||||
SUB_LIST+= RUN_AS_USER="yes" | SUB_LIST+= RUN_AS_USER="yes" | ||||
.else | .else | ||||
SUB_LIST+= RUN_AS_USER="no" | SUB_LIST+= RUN_AS_USER="no" | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MKERBEROS} || ${PORT_OPTIONS:MHEIMDAL} | .if ${PORT_OPTIONS:MKERBEROS} || ${PORT_OPTIONS:MHEIMDAL} | ||||
.if ${PORT_OPTIONS:MHEIMDAL} | .if ${PORT_OPTIONS:MHEIMDAL} | ||||
.if ${PORT_OPTIONS:MHEIMDAL_PORT} | |||||
LIB_DEPENDS+= libkrb5.so:security/heimdal | LIB_DEPENDS+= libkrb5.so:security/heimdal | ||||
.endif | |||||
CONFIGURE_ARGS+=--enable-heimdal-krb5 | CONFIGURE_ARGS+=--enable-heimdal-krb5 | ||||
.else | .else | ||||
LIB_DEPENDS+= libkrb5support.so:security/krb5 | LIB_DEPENDS+= libkrb5support.so:security/krb5 | ||||
.endif | .endif | ||||
CONFIGURE_ARGS+=--with-rlm_krb5 | CONFIGURE_ARGS+=--with-rlm_krb5 | ||||
.if ${PORT_OPTIONS:MHEIMDAL} && empty(PORT_OPTIONS:MHEIMDAL_PORT) | |||||
CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=/usr/lib | |||||
CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=/usr/include | |||||
CONFIGURE_ENV+= KRB5LIBS="$$(${KRB5_CONFIG})" | |||||
.else | |||||
CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=${LOCALBASE}/lib | CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=${LOCALBASE}/lib | ||||
CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=${LOCALBASE}/include | CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=${LOCALBASE}/include | ||||
.endif | |||||
PLIST_SUB+= KRB5="" | PLIST_SUB+= KRB5="" | ||||
.else | .else | ||||
CONFIGURE_ARGS+=--without-rlm_krb5 | CONFIGURE_ARGS+=--without-rlm_krb5 | ||||
PLIST_SUB+= KRB5="@comment " | PLIST_SUB+= KRB5="@comment " | ||||
.endif | .endif | ||||
.if ${PORT_OPTIONS:MEDIR} | .if ${PORT_OPTIONS:MEDIR} | ||||
CONFIGURE_ARGS+=--with-edir | CONFIGURE_ARGS+=--with-edir | ||||
▲ Show 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | |||||
post-patch: | post-patch: | ||||
# never try to find execinfo.h (needed until we can enable/disable backtrace | # never try to find execinfo.h (needed until we can enable/disable backtrace | ||||
@${REINPLACE_CMD} '/execinfo.h/d' ${WRKSRC}/configure.in | @${REINPLACE_CMD} '/execinfo.h/d' ${WRKSRC}/configure.in | ||||
# Patch raddb/certs/Makefile for the full path to the openssl binary (using | # Patch raddb/certs/Makefile for the full path to the openssl binary (using | ||||
# ports OpenSSL if installed) | # ports OpenSSL if installed) | ||||
@${REINPLACE_CMD} -E \ | @${REINPLACE_CMD} -E \ | ||||
-e "s:^([[:space:]])+openssl:\1${OPENSSLBASE}/bin/openssl:g" \ | -e "s:^([[:space:]])+openssl:\1${OPENSSLBASE}/bin/openssl:g" \ | ||||
${WRKSRC}/raddb/certs/Makefile | ${WRKSRC}/raddb/certs/Makefile | ||||
# If we're using Heimdal from base, alter the LIBS variable | |||||
# XXX Should patch configure.in instead of configure because it is regenerated | |||||
.if ${PORT_OPTIONS:MHEIMDAL} && empty(PORT_OPTIONS:MHEIMDAL_PORT) | |||||
@${REINPLACE_CMD} -e 's|LIBS|KRB5LIBS|g' ${WRKSRC}/src/modules/rlm_krb5/configure | |||||
@${REINPLACE_CMD} -e 's|-lkrb5|$$(${KRB5_CONFIG})|g' \ | |||||
${WRKSRC}/src/modules/rlm_krb5/configure | |||||
.endif | |||||
# If DHCP is enabled, enable the DHCP dictionary | # If DHCP is enabled, enable the DHCP dictionary | ||||
.if ${PORT_OPTIONS:MDHCP} | .if ${PORT_OPTIONS:MDHCP} | ||||
@${REINPLACE_CMD} -Ee 's:^#(.+ dictionary\.dhcp)$$:\1:g' \ | @${REINPLACE_CMD} -Ee 's:^#(.+ dictionary\.dhcp)$$:\1:g' \ | ||||
${WRKSRC}/share/dictionary | ${WRKSRC}/share/dictionary | ||||
.endif | .endif | ||||
# Patch scripts/Makefile not to install (unnecessary) rc.radiusd | # Patch scripts/Makefile not to install (unnecessary) rc.radiusd | ||||
@${REINPLACE_CMD} -Ee 's:^(.+rc\.radiusd.+)$$:#\1:g' \ | @${REINPLACE_CMD} -Ee 's:^(.+rc\.radiusd.+)$$:#\1:g' \ | ||||
${WRKSRC}/scripts/Makefile | ${WRKSRC}/scripts/Makefile | ||||
post-install: | post-install: | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}-${PORTVERSION}/*.so | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}-${PORTVERSION}/*.so | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rlm_* \ | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/rlm_* \ | ||||
${STAGEDIR}${PREFIX}/sbin/radiusd | ${STAGEDIR}${PREFIX}/sbin/radiusd | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |