diff options
author | lwhsu <lwhsu@FreeBSD.org> | 2007-10-29 06:08:45 +0800 |
---|---|---|
committer | lwhsu <lwhsu@FreeBSD.org> | 2007-10-29 06:08:45 +0800 |
commit | a8dcf6b522c75483a64188ea6d0b6d2bf8a3f520 (patch) | |
tree | e6a65af5e82b6bffbb464adadc76a368a31c49db /net/freeradius | |
parent | a63ce0aa2def2f88e77e0adac6bfa505a0641950 (diff) | |
download | freebsd-ports-gnome-a8dcf6b522c75483a64188ea6d0b6d2bf8a3f520.tar.gz freebsd-ports-gnome-a8dcf6b522c75483a64188ea6d0b6d2bf8a3f520.tar.zst freebsd-ports-gnome-a8dcf6b522c75483a64188ea6d0b6d2bf8a3f520.zip |
- Remove more 4.x cruft (obsolete comment in Makefile, obsolete patch,
simplification in WITH_NOPERL handling in Makefile).
- Use MASTER_SITE_SUBDIR rather than an explicit /old reference in
MASTER_SITES.
- Tidy pkg-plist, including the use of @stopdaemon and some mild reordering
so that it is more logical.
- Avoid spurious -L/usr/lib in the radiusd build step when using base OpenSSL.
- Use ${PTHREAD_LIBS} rather than -pthread.
- Remove the -p flag to cp when copying files into /usr/local/etc/raddb (this
may help stop FreeRADIUS stomping over explicitly set ownership and
permissions in this directory). [1]
- Generalise CONFLICTS.
- Support WITH_DEVELOPER (though it has to be used as a knob - I see no reason
to add this to the OPTIONS).
- Bump PORTREVISION.
[1] May address a concern of sem@ (maintainer had discussion by private mail)
PR: ports/117160
Submitted by: David Wood <david AT wood2.org.uk> (maintainer)
Diffstat (limited to 'net/freeradius')
-rw-r--r-- | net/freeradius/Makefile | 29 | ||||
-rw-r--r-- | net/freeradius/files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c | 10 | ||||
-rw-r--r-- | net/freeradius/pkg-plist | 23 |
3 files changed, 29 insertions, 33 deletions
diff --git a/net/freeradius/Makefile b/net/freeradius/Makefile index ea5091b3fcab..93d83d62caf3 100644 --- a/net/freeradius/Makefile +++ b/net/freeradius/Makefile @@ -7,14 +7,14 @@ PORTNAME= freeradius PORTVERSION?= 1.1.7 -PORTREVISION?= 0 +PORTREVISION?= 1 CATEGORIES= net MASTER_SITES= ftp://ftp.freeradius.org/pub/radius/ \ ftp://ftp.ntua.gr/pub/net/radius/freeradius/ \ ftp://ftp.uk.freeradius.org/pub/radius/ \ ftp://ftp.us.freeradius.org/pub/radius/ \ - ftp://ftp.freeradius.org/pub/radius/old/ \ http://freeradius.portal-to-web.de/ +MASTER_SITE_SUBDIR= . old MAINTAINER?= david@wood2.org.uk COMMENT?= A free RADIUS server implementation @@ -29,7 +29,7 @@ LOGDIR?= /var/log # If FREERADIUS_SLAVE_MYSQL is defined, we want to build the # freeradius-mysql slave port -CONFLICTS= gnu-radius-1.* openradius-0.* radiusd-cistron-1.* +CONFLICTS= gnu-radius-[0-9].* openradius-[0-9].* radiusd-cistron-[0-9].* .ifdef(FREERADIUS_SLAVE_MYSQL) CONFLICTS+= freeradius-[0-9].* freeradius-mysql-[02-9].* PKGNAMESUFFIX= -mysql @@ -87,9 +87,13 @@ PLIST_SUB+= PORTDOCS="" .endif CONFIGURE_ARGS+=--with-logdir=${LOGDIR} \ --with-large-files \ - --with-openssl-includes=${OPENSSLINC} \ - --with-openssl-libraries=${OPENSSLLIB} \ - --without-rlm_sql_db2 \ + --with-openssl-includes=${OPENSSLINC} +# This conditionality avoids -L/usr/lib in the radiusd build step when +# building with base system OpenSSL +.if ${OPENSSLLIB} != "/usr/lib" +CONFIGURE_ARGS+=--with-openssl-libraries=${OPENSSLLIB} +.endif +CONFIGURE_ARGS+=--without-rlm_sql_db2 \ --without-rlm_sql_freetds \ --without-rlm_sql_iodbc \ --without-rlm_sql_oracle \ @@ -186,15 +190,15 @@ PLIST_SUB+= EXPM="" PLIST_SUB+= EXPM="@comment " .endif -.ifndef(WITH_NOPERL) -USE_PERL5= yes +.ifdef(WITH_DEVELOPER) +CONFIGURE_ARGS+=--enable-developer .endif -# rlm_perl does not build on 4.x -.if defined(WITH_NOPERL) +.ifdef(WITH_NOPERL) CONFIGURE_ARGS+=--without-rlm_perl PLIST_SUB+= RLMPERL="@comment " .else +USE_PERL5= yes CONFIGURE_ARGS+=--with-rlm_perl PLIST_SUB+= RLMPERL="" .endif @@ -222,6 +226,9 @@ post-patch: @${FIND} -E ${WRKSRC} -regex '.*/Makefile(\.in)?\.(orig|bak)$$' -delete pre-configure: +# Replace -pthread with ${PTHREAD_LIBS} in configure(.in) files + @${FIND} -E ${WRKSRC} -regex '.*/configure(\.in)?$$' -exec \ + ${REINPLACE_CMD} -e "s:-pthread:${PTHREAD_LIBS}:g" {} \; # Force the rebuild of some configures from configure.in, as we're patching # the configure.in # NOTE: ${WRKSRC}/configure is rebuilt automatically once autoconf:261 is @@ -245,7 +252,7 @@ post-install: @for i in `${FIND} ${EXAMPLESDIR}/raddb/ -type f -print \ | ${SED} -e 's:^${EXAMPLESDIR}/raddb/::g'`; do \ if [ ! -f ${PREFIX}/etc/raddb/$${i} ]; then \ - ${CP} -p ${EXAMPLESDIR}/raddb/$${i} ${PREFIX}/etc/raddb/$${i}; \ + ${CP} ${EXAMPLESDIR}/raddb/$${i} ${PREFIX}/etc/raddb/$${i}; \ fi; \ done # Set ${PREFIX}/etc/raddb and all the files and folders in it to g-w,o-rwx diff --git a/net/freeradius/files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c b/net/freeradius/files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c deleted file mode 100644 index 87dc2eb821e2..000000000000 --- a/net/freeradius/files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c +++ /dev/null @@ -1,10 +0,0 @@ ---- src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c.orig Sat Jun 18 14:29:43 2005 -+++ src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c Sat Jun 18 14:31:48 2005 -@@ -27,6 +27,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#include <sys/types.h> - #ifdef HAVE_REGEX_H - # include <regex.h> - #endif diff --git a/net/freeradius/pkg-plist b/net/freeradius/pkg-plist index 2a6f3e298ca2..0353a31f628c 100644 --- a/net/freeradius/pkg-plist +++ b/net/freeradius/pkg-plist @@ -1,5 +1,4 @@ -@unexec %D/etc/rc.d/radiusd.sh forcestop 2>/dev/null || true -@unexec %D/etc/rc.d/radiusd forcestop 2>/dev/null || true +@stopdaemon radiusd bin/radclient bin/radeapclient bin/radlast @@ -14,6 +13,10 @@ bin/rlm_ippool_tool bin/smbencrypt @unexec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type f -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ -f %D/%%EXAMPLESDIR%%/raddb/${i} ]; then if cmp -s %D/%%EXAMPLESDIR%%/raddb/${i} %D/etc/raddb/${i}; then rm -f %D/etc/raddb/${i}; fi; fi; done @unexec for i in `find -d %D/%%EXAMPLESDIR%%/raddb/ -type d -mindepth 1 -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ -d %D/etc/raddb/${i} ]; then rmdir %D/etc/raddb/${i} 2>/dev/null || true; fi; done +@dirrmtry etc/raddb/certs/demoCA +@dirrmtry etc/raddb/certs +@dirrmtry etc/raddb +@unexec if [ -d %D/etc/raddb ]; then echo "You should remove %D/etc/raddb if you don't need it any more."; fi %%EXAMPLESDIR%%/raddb/acct_users %%EXAMPLESDIR%%/raddb/attrs %%EXAMPLESDIR%%/raddb/certs/README @@ -35,11 +38,10 @@ bin/smbencrypt %%EXAMPLESDIR%%/raddb/certs/root.der %%EXAMPLESDIR%%/raddb/certs/root.p12 %%EXAMPLESDIR%%/raddb/certs/root.pem -%%EXAMPLESDIR%%/raddb/clients.conf %%EXAMPLESDIR%%/raddb/clients +%%EXAMPLESDIR%%/raddb/clients.conf %%EXAMPLESDIR%%/raddb/dictionary %%EXAMPLESDIR%%/raddb/eap.conf -%%EXAMPLESDIR%%/raddb/example.pl %%EXAMPLESDIR%%/raddb/experimental.conf %%EXAMPLESDIR%%/raddb/hints %%EXAMPLESDIR%%/raddb/huntgroups @@ -59,8 +61,9 @@ bin/smbencrypt %%EXAMPLESDIR%%/raddb/sql.conf %%EXAMPLESDIR%%/raddb/sqlippool.conf %%EXAMPLESDIR%%/raddb/users +%%EXAMPLESDIR%%/raddb/example.pl @exec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type d -mindepth 1 -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ ! -d %D/etc/raddb/${i} ]; then mkdir -p %D/etc/raddb/${i}; fi; done -@exec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type f -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ ! -f %D/etc/raddb/${i} ]; then cp -p %D/%%EXAMPLESDIR%%/raddb/${i} %D/etc/raddb/${i}; fi; done +@exec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type f -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ ! -f %D/etc/raddb/${i} ]; then cp %D/%%EXAMPLESDIR%%/raddb/${i} %D/etc/raddb/${i}; fi; done @exec chmod -R g-w,o-rwx %D/etc/raddb @dirrm %%EXAMPLESDIR%%/raddb/certs/demoCA @dirrm %%EXAMPLESDIR%%/raddb/certs @@ -421,6 +424,9 @@ sbin/rc.radiusd %%PORTDOCS%%%%DOCSDIR%%/supervise-radiusd.txt %%PORTDOCS%%%%DOCSDIR%%/tuning_guide %%PORTDOCS%%%%DOCSDIR%%/variables.txt +%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc +%%PORTDOCS%%@dirrm %%DOCSDIR%%/examples +%%PORTDOCS%%@dirrm %%DOCSDIR%% %%DATADIR%%/dictionary %%DATADIR%%/dictionary.3com %%DATADIR%%/dictionary.3gpp @@ -522,14 +528,7 @@ sbin/rc.radiusd %%DATADIR%%/dictionary.xylan %%DATADIR%%/dictionary.zyxel @dirrm %%DATADIR%% -%%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc -%%PORTDOCS%%@dirrm %%DOCSDIR%%/examples -%%PORTDOCS%%@dirrm %%DOCSDIR%% @exec mkdir -p /var/log/raddb @exec chmod -R og= /var/log/raddb @exec mkdir -p /var/run/radiusd @unexec rm -fr /var/run/radiusd -@dirrmtry etc/raddb/certs/demoCA -@dirrmtry etc/raddb/certs -@dirrmtry etc/raddb -@unexec if [ -d %D/etc/raddb ]; then echo "You should remove %D/etc/raddb if you don't need it anymore."; fi |