aboutsummaryrefslogtreecommitdiff
path: root/net/freeradius2
diff options
context:
space:
mode:
authorSergey Matveychuk <sem@FreeBSD.org>2005-04-15 17:31:55 +0000
committerSergey Matveychuk <sem@FreeBSD.org>2005-04-15 17:31:55 +0000
commit071a17a29e510cf55ad2232632d6f986788b88c4 (patch)
treec697a122224d7b5c8efa9095e9e991fad579297a /net/freeradius2
parent92ad9a4c495dc468cd07bb75051e4a624b523469 (diff)
downloadports-071a17a29e510cf55ad2232632d6f986788b88c4.tar.gz
ports-071a17a29e510cf55ad2232632d6f986788b88c4.zip
Notes
Diffstat (limited to 'net/freeradius2')
-rw-r--r--net/freeradius2/Makefile29
-rw-r--r--net/freeradius2/files/patch-raddb-Makefile44
-rw-r--r--net/freeradius2/files/radiusd.sh1
-rw-r--r--net/freeradius2/pkg-plist55
4 files changed, 102 insertions, 27 deletions
diff --git a/net/freeradius2/Makefile b/net/freeradius2/Makefile
index 6225d9bcb025..6506fcea7fe4 100644
--- a/net/freeradius2/Makefile
+++ b/net/freeradius2/Makefile
@@ -7,6 +7,7 @@
PORTNAME= freeradius
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.freeradius.org/pub/radius/ \
ftp://ftp.Awfulhak.org/pub/radius/
@@ -33,11 +34,12 @@ CONFIGURE_ARGS= --prefix=${PREFIX} --quiet --with-logdir=${LOGDIR} \
--with-ltdl-lib=${LOCALBASE}/lib \
--with-large-files --without-rlm_sql_unixodbc \
--without-rlm_sql_oracle --without-rlm_sql_iodbc \
- --without-rlm_sql_db2 --without-rlm_krb5
+ --without-rlm_sql_db2
PLIST_SUB= PORTVERSION=${PORTVERSION}
-OPTIONS= LDAP "With LDAP user database" off \
+OPTIONS= KERBEROS "With Kerberos support" off \
+ LDAP "With LDAP user database" off \
MYSQL "With MySQL user database" off \
PGSQL "With PostgreSQL use database" off \
SNMP "With SNMP support" off \
@@ -45,6 +47,16 @@ OPTIONS= LDAP "With LDAP user database" off \
.include <bsd.port.pre.mk>
+.ifdef(WITH_KERBEROS)
+LIB_DEPENDS+= krb5.3:${PORTSDIR}/security/krb5
+CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=${LOCALBASE}/lib
+CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=${LOCALBASE}/include
+PLIST_SUB+= KRB5=""
+.else
+CONFIGURE_ARGS+=--without-rlm_krb5
+PLIST_SUB+= KRB5="@comment "
+.endif
+
.ifdef(WITH_LDAP)
USE_OPENLDAP= YES
PLIST_SUB+= LDAP=""
@@ -129,10 +141,21 @@ post-patch:
< ${FILESDIR}/radiusd.sh > ${WRKDIR}/radiusd.sh
post-install:
- @${MKDIR} ${PREFIX}/etc/raddb ${DATADIR}
+ @${MKDIR} ${PREFIX}/etc/raddb ${DATADIR} ${EXAMPLESDIR}
.for dict in ${DICTS}
${INSTALL_DATA} ${WRKSRC}/share/${dict} ${DATADIR}/${dict}
.endfor
${INSTALL_SCRIPT} ${WRKDIR}/radiusd.sh ${PREFIX}/etc/rc.d/radiusd.sh
+.ifdef(WITH_MYSQL)
+ ${INSTALL_DATA} \
+ ${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql \
+ ${EXAMPLESDIR}/db_mysql.sql
+.endif
+
+.ifdef(WITH_PGSQL)
+ ${INSTALL_DATA} \
+ ${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_postgresql/db_postgresql.sql \
+ ${EXAMPLESDIR}/db_postgresql.sql
+.endif
.include <bsd.port.post.mk>
diff --git a/net/freeradius2/files/patch-raddb-Makefile b/net/freeradius2/files/patch-raddb-Makefile
new file mode 100644
index 000000000000..408316428697
--- /dev/null
+++ b/net/freeradius2/files/patch-raddb-Makefile
@@ -0,0 +1,44 @@
+--- raddb/Makefile.orig Thu Apr 14 21:31:54 2005
++++ raddb/Makefile Thu Apr 14 21:36:19 2005
+@@ -7,7 +7,7 @@
+ experimental.conf hints huntgroups ldap.attrmap \
+ mssql.conf naslist naspasswd oraclesql.conf postgresql.conf \
+ preproxy_users proxy.conf radiusd.conf realms snmp.conf \
+- sql.conf users x99.conf x99passwd.sample
++ sql.conf users x99.conf
+
+ all:
+
+@@ -15,26 +15,12 @@
+ $(INSTALL) -d -m 755 $(R)$(raddbdir)
+ @echo "Creating/updating files in $(R)$(raddbdir)"; \
+ for i in $(FILES); do \
+- [ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
+- if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
+- echo "** $(R)$(raddbdir)/$$i"; \
+- nt=1; \
+- fi; \
+- done; \
+- if [ "$$nt" ]; then \
+- echo "**";\
+- echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+- echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+- echo "**";\
+- echo "** The sample configuration files in `pwd`";\
+- echo "** are newer than those in $(R)$(raddbdir)";\
+- echo "**";\
+- echo "** Please investigate and manually copy (if appropriate) the files listed above.";\
+- echo "**";\
+- echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+- echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+- fi
+- chmod 640 $(R)$(raddbdir)/naspasswd $(R)$(raddbdir)/clients $(R)$(raddbdir)/clients.conf
++ $(INSTALL) -m 644 $$i $(R)$(raddbdir)/$$i.sample; \
++ done
++ $(INSTALL) -m 644 x99passwd.sample $(R)$(raddbdir)
++ chmod 640 $(R)$(raddbdir)/naspasswd.sample \
++ $(R)$(raddbdir)/clients.sample \
++ $(R)$(raddbdir)/clients.conf.sample
+ if [ ! -d $(R)$(raddbdir)/certs ]; then \
+ mkdir $(R)$(raddbdir)/certs; \
+ mkdir $(R)$(raddbdir)/certs/demoCA; \
diff --git a/net/freeradius2/files/radiusd.sh b/net/freeradius2/files/radiusd.sh
index ea3a152bfd47..7f18ab7c40d2 100644
--- a/net/freeradius2/files/radiusd.sh
+++ b/net/freeradius2/files/radiusd.sh
@@ -22,6 +22,7 @@ required_files=${radiusd_config}
pidfile=/var/run/radiusd/radiusd.pid
radiusd_enable=${radiusd_enable:-"NO"}
+start_precmd="${radiusd_start_precmd}"
load_rc_config $name
run_rc_command "$1"
diff --git a/net/freeradius2/pkg-plist b/net/freeradius2/pkg-plist
index ffa2b648eb0b..6b31df51db6e 100644
--- a/net/freeradius2/pkg-plist
+++ b/net/freeradius2/pkg-plist
@@ -29,30 +29,30 @@ etc/raddb/certs/cert-clt.p12
etc/raddb/certs/cert-clt.der
etc/raddb/certs/root.pem
etc/raddb/certs/README
-etc/raddb/acct_users
-etc/raddb/attrs
-etc/raddb/clients
-etc/raddb/clients.conf
-etc/raddb/dictionary
+etc/raddb/acct_users.sample
+etc/raddb/attrs.sample
+etc/raddb/clients.sample
+etc/raddb/clients.conf.sample
+etc/raddb/dictionary.sample
%%EXPM%%etc/raddb/example.pl
-etc/raddb/experimental.conf
-etc/raddb/eap.conf
-etc/raddb/hints
-etc/raddb/huntgroups
-etc/raddb/ldap.attrmap
-etc/raddb/mssql.conf
-etc/raddb/naslist
-etc/raddb/naspasswd
-etc/raddb/oraclesql.conf
-etc/raddb/postgresql.conf
-etc/raddb/preproxy_users
-etc/raddb/proxy.conf
-etc/raddb/radiusd.conf
-etc/raddb/realms
-etc/raddb/snmp.conf
-etc/raddb/sql.conf
-etc/raddb/users
-etc/raddb/x99.conf
+etc/raddb/experimental.conf.sample
+etc/raddb/eap.conf.sample
+etc/raddb/hints.sample
+etc/raddb/huntgroups.sample
+etc/raddb/ldap.attrmap.sample
+etc/raddb/mssql.conf.sample
+etc/raddb/naslist.sample
+etc/raddb/naspasswd.sample
+etc/raddb/oraclesql.conf.sample
+etc/raddb/postgresql.conf.sample
+etc/raddb/preproxy_users.sample
+etc/raddb/proxy.conf.sample
+etc/raddb/radiusd.conf.sample
+etc/raddb/realms.sample
+etc/raddb/snmp.conf.sample
+etc/raddb/sql.conf.sample
+etc/raddb/users.sample
+etc/raddb/x99.conf.sample
etc/raddb/x99passwd.sample
etc/rc.d/radiusd.sh
lib/libeap-%%PORTVERSION%%.la
@@ -195,6 +195,11 @@ lib/rlm_ippool-%%PORTVERSION%%.so
lib/rlm_ippool.a
lib/rlm_ippool.la
lib/rlm_ippool.so
+%%KRB5%%lib/rlm_krb5-%%PORTVERSION%%.la
+%%KRB5%%lib/rlm_krb5-%%PORTVERSION%%.so
+%%KRB5%%lib/rlm_krb5.a
+%%KRB5%%lib/rlm_krb5.la
+%%KRB5%%lib/rlm_krb5.so
%%LDAP%%lib/rlm_ldap-%%PORTVERSION%%.la
%%LDAP%%lib/rlm_ldap-%%PORTVERSION%%.so
%%LDAP%%lib/rlm_ldap.a
@@ -425,14 +430,16 @@ sbin/rc.radiusd
%%DATADIR%%/dictionary.versanet
%%DATADIR%%/dictionary.wispr
%%DATADIR%%/dictionary.xedia
+%%MYSQL%%%%EXAMPLESDIR%%/db_mysql.sql
+%%PGSQL%%%%EXAMPLESDIR%%/db_postgresql.sql
@dirrm %%DATADIR%%
+@dirrm %%EXAMPLESDIR%%
%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc
%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm etc/raddb/certs/demoCA
@dirrm etc/raddb/certs
@exec mkdir -p /var/log/raddb
@exec chmod -R og= /var/log/raddb
-@unexec rm -fr /var/log/raddb
@exec mkdir -p /var/run/radiusd
@unexec rm -fr /var/run/radiusd
@unexec rmdir %D/etc/raddb 2> /dev/null || echo "You should remove %D/etc/raddb if you don't need it anymore."