aboutsummaryrefslogtreecommitdiffstats
path: root/net/freeradius3/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'net/freeradius3/Makefile')
-rw-r--r--net/freeradius3/Makefile58
1 files changed, 9 insertions, 49 deletions
diff --git a/net/freeradius3/Makefile b/net/freeradius3/Makefile
index 0db3d8000313..d275564ba86d 100644
--- a/net/freeradius3/Makefile
+++ b/net/freeradius3/Makefile
@@ -14,7 +14,7 @@ PKGNAMESUFFIX= 3
DISTNAME= freeradius-server-${DISTVERSION}
MAINTAINER= zi@FreeBSD.org
-COMMENT= A free RADIUS server implementation
+COMMENT= Free RADIUS server implementation
LICENSE= GPLv2
@@ -24,16 +24,17 @@ LIB_DEPENDS= libgdbm.so:${PORTSDIR}/databases/gdbm \
LOGDIR?= /var/log
KRB5_CONFIG?= /usr/bin/krb5-config --libs
-CONFLICTS= gnu-radius-[0-9].* openradius-[0-9].* radiusd-cistron-[0-9].* \
- freeradius-mysql-[0-9].* freeradius-[0124-9].*
+CONFLICTS_INSTALL= gnu-radius-[0-9].* openradius-[0-9].* radiusd-cistron-[0-9].* \
+ freeradius-mysql-[0-9].* freeradius-[^3].*
USE_RC_SUBR= radiusd
-USES= gmake
+USES= gmake tar:bzip2
GNU_CONFIGURE= yes
-USE_BZIP2= yes
USE_OPENSSL= yes
MAKE_ARGS+= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+# Prevent /root/.rnd leftover
+MAKE_ARGS+= HOME=/dev/null
CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
MAKE_JOBS_SAFE= yes
@@ -57,8 +58,6 @@ EDIR_DESC= Enable eDirectory support (implies LDAP)
REST_DESC= Enable RESTful API support
SSL_PORT_DESC= Use OpenSSL from the ports collection
-NO_STAGE= yes
-
.include <bsd.port.options.mk>
# Default requirements for rc script
@@ -290,9 +289,7 @@ WITH_OPENSSL_PORT=yes
.include <bsd.port.pre.mk>
# if we're installing, place sample configs into ${EXAMPLESDIR}
-.if make(install)
-MAKE_ENV+= raddbdir="${EXAMPLESDIR}/raddb"
-.endif
+MAKE_ARGS+= raddbdir="${EXAMPLESDIR}/raddb" R=${STAGEDIR}
.if ${ARCH} == "sparc64" && ${OSVERSION} < 700000
BROKEN= Does not build on sparc64-6
@@ -338,24 +335,13 @@ CONFIGURE_ARGS+=--with-logdir=${LOGDIR} \
CONFIGURE_ARGS+=--with-pic
.endif
+SUB_FILES+= pkg-install pkg-message
SUB_LIST+= RADIUS_USER="${RADIUS_USER}" \
RADIUS_GROUP="${RADIUS_GROUP}" \
RADDB_WORK="${WRKSRC}/raddb" \
RADDB="${PREFIX}/etc/raddb" \
LOGDIR="${LOGDIR}" \
LIBDIR="${PREFIX}/${FREERADIUS_LIBDIR}"
-SUB_FILES+= pkg-install pkg-message
-
-MAN1= radclient.1 radeapclient.1 radlast.1 radtest.1 radwho.1 \
- radzap.1 smbencrypt.1
-MAN5= clients.conf.5 dictionary.5 radiusd.conf.5 radrelay.conf.5 \
- rlm_always.5 rlm_attr_filter.5 rlm_chap.5 rlm_counter.5 \
- rlm_detail.5 rlm_digest.5 rlm_expr.5 rlm_files.5 rlm_mschap.5 \
- rlm_pap.5 rlm_passwd.5 rlm_realm.5 rlm_sql.5 \
- rlm_unix.5 unlang.5 users.5 checkrad.5 rlm_idn.5
-MAN8= radiusd.8 radmin.8 raddebug.8 radrelay.8 radsqlrelay.8 \
- rlm_ippool_tool.8 radconf2xml.8 radcrypt.8 radsniff.8
-
SUB_LIST+= REQUIRE="${_REQUIRE}"
post-patch:
@@ -363,8 +349,6 @@ post-patch:
@${REINPLACE_CMD} -e '/execinfo.h/d' ${WRKSRC}/configure
@${REINPLACE_CMD} -Ee "s:tests/all.mk ::" ${WRKSRC}/src/all.mk
@${CP} ${WRKSRC}/m4/ax_with_prog.m4 ${WRKSRC}
- @${REINPLACE_CMD} -Ee "s:^make:${GMAKE}:" \
- ${WRKSRC}/raddb/certs/bootstrap
# Patch raddb/certs/Makefile for the full path to the openssl binary (using
# ports OpenSSL if installed)
@${REINPLACE_CMD} -E \
@@ -372,11 +356,7 @@ post-patch:
${WRKSRC}/raddb/certs/Makefile
@${REINPLACE_CMD} -Ee 's: ..R...sbindir./rc.radiusd : :' \
${WRKSRC}/scripts/all.mk
-# Clean up after the last two operations (so as not to get unwanted files in
-# raddb)
- @${FIND} -E ${WRKSRC}/raddb/certs \
- -regex '.*/(bootstrap|Makefile)\.(orig|bak)$$' \
- -delete
+
# If we're using Heimdal from base, alter the LIBS variable
.if ${PORT_OPTIONS:MHEIMDAL} && empty(PORT_OPTIONS:MHEIMDAL_PORT)
@${REINPLACE_CMD} -e 's|LIBS|KRB5LIBS|g' ${WRKSRC}/src/modules/rlm_krb5/configure
@@ -392,24 +372,4 @@ pre-configure:
@${FIND} -E ${WRKSRC} -regex '.*/configure(\.in)?$$' -exec \
${REINPLACE_CMD} -e "s:-pthread:${PTHREAD_LIBS}:g" {} \;
-pre-install:
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
- PRE-INSTALL
-
-post-install:
-# If ${PREFIX}/etc/raddb isn't a directory (or a symlink), make a copy
-# of ${EXAMPLESDIR}/raddb as ${PREFIX}/etc/raddb, then bootstrap the
-# certificates
- @if ! [ -d ${PREFIX}/etc/raddb -o -L ${PREFIX}/etc/raddb ]; then \
- ${CP} -RP ${EXAMPLESDIR}/raddb ${PREFIX}/etc/raddb; \
- ${ECHO_MSG} '===> Bootstrapping default certificates, please wait...'; \
- ${PREFIX}/etc/raddb/certs/bootstrap >/dev/null 2>&1; \
- fi
-# Set ${PREFIX}/etc/raddb and all the files and folders in it to g-w,o-rwx
-# (FreeRADIUS will probably complain if this is not done)
- @${CHMOD} -R g-w,o-rwx ${PREFIX}/etc/raddb
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
- POST-INSTALL
- @${CAT} ${PKGMESSAGE}
-
.include <bsd.port.post.mk>