aboutsummaryrefslogtreecommitdiffstats
path: root/security/krb5
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2008-05-15 07:06:13 +0800
committercy <cy@FreeBSD.org>2008-05-15 07:06:13 +0800
commitf094f9beb9b50ff88aad8d92c817698dd9116521 (patch)
treecd7e65b7f57a38f8ae78c2d771247af425810e7d /security/krb5
parentba245067e95356b0a70dd90437db88d0accf5c26 (diff)
downloadfreebsd-ports-gnome-f094f9beb9b50ff88aad8d92c817698dd9116521.tar.gz
freebsd-ports-gnome-f094f9beb9b50ff88aad8d92c817698dd9116521.tar.zst
freebsd-ports-gnome-f094f9beb9b50ff88aad8d92c817698dd9116521.zip
Implement OPTIONS menu.
Implement options that will allow the user to: - rename ftp and ftpd to kftp and kftpd - rename telnet and telnetd to ktelnet and ktelnetd - rename rlogin to krlogin - rename rsh to krsh - rename rcp to krcp This avoids shadowing by or being shadowed by, depending on one's PATH, system utilities of the same name.
Diffstat (limited to 'security/krb5')
-rw-r--r--security/krb5/Makefile73
-rw-r--r--security/krb5/pkg-plist14
2 files changed, 70 insertions, 17 deletions
diff --git a/security/krb5/Makefile b/security/krb5/Makefile
index 1ab490d7c599..e2398c85a936 100644
--- a/security/krb5/Makefile
+++ b/security/krb5/Makefile
@@ -36,16 +36,24 @@ CONFIGURE_ARGS?= --enable-shared
CONFIGURE_ENV= INSTALL="${INSTALL}" YACC=/usr/bin/yacc \
CFLAGS="${CFLAGS}"
MAKE_ARGS= INSTALL="${INSTALL}"
-KRB5_KRB4_COMPAT?= NO
-KRB5_DOC?= YES
-.if defined(KRB5_DOC) && ${KRB5_DOC} == "YES"
+OPTIONS= KRB5_RENAME_FTP "Rename ftp to kftp" off \
+ KRB5_RENAME_TELNET "Rename telnet to ktelnet" off \
+ KRB5_RENAME_RLOGIN "Rename rlogin to krlogin" off \
+ KRB5_RENAME_RSH "Rename rsh to krsh" off \
+ KRB5_RENAME_RCP "Rename rcp to krcp" off \
+ KRB5_KRB4_COMPAT "Build and install krb4 compatibility" off \
+ KRB5_DOC "Build and install krb5 documentation" on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_KRB5_DOC)
BUILD_DEPENDS+= texi2dvi:${PORTSDIR}/print/texinfo \
dvips:${PORTSDIR}/print/dvipsk-tetex
INFO= krb425 krb5-admin krb5-install krb5-user
.endif
-.if !defined(KRB5_KRB4_COMPAT) || ${KRB5_KRB4_COMPAT} == "NO"
+.if !defined(WITH_KRB5_KRB4_COMPAT)
CONFIGURE_ARGS+= --without-krb4
PLIST_SUB+= KRB4="@comment "
.else
@@ -59,18 +67,65 @@ PREFIX= ${KRB5_HOME}
MAN1= krb5-send-pr.1 krb5-config.1 kpasswd.1 klist.1 \
kinit.1 kdestroy.1 ksu.1 sclient.1 rsh.1 rcp.1 \
rlogin.1 ftp.1 telnet.1 kerberos.1 kvno.1 compile_et.1
-.if defined(KRB5_KRB4_COMPAT) && ${KRB5_KRB4_COMPAT} != "NO"
-MAN1+= krb524init.1 v4rcp.1
-.endif
MAN5= kdc.conf.5 krb5.conf.5 .k5login.5
MAN8= krb5kdc.8 kadmin.8 kadmin.local.8 kdb5_util.8 \
ktutil.8 kadmind.8 kprop.8 kpropd.8 sserver.8 \
kshd.8 klogind.8 login.krb5.8 ftpd.8 telnetd.8 \
k5srvutil.8
-.if defined(KRB5_KRB4_COMPAT) && ${KRB5_KRB4_COMPAT} != "NO"
+.if defined(WITH_KRB5_KRB4_COMPAT)
MAN8+= krb524d.8
.endif
+.if defined(WITH_KRB5_RENAME_FTP)
+MAN1:= ${MAN1:C/ftp/kftp/}
+MAN8:= ${MAN8:C/ftp/kftp/}
+PROGRAM_TRANSFORM_NAME+= s/^ftp/kftp/;
+PLIST_SUB+= FTP_PROG="kftp"
+.else
+PLIST_SUB+= FTP_PROG="ftp"
+.endif
+
+.if defined(WITH_KRB5_RENAME_TELNET)
+MAN1:= ${MAN1:C/telnet/ktelnet/}
+MAN8:= ${MAN8:C/telnet/ktelnet/}
+PROGRAM_TRANSFORM_NAME+= s/^telnet/ktelnet/;
+PLIST_SUB+= TELNET_PROG="ktelnet"
+.else
+PLIST_SUB+= TELNET_PROG="telnet"
+.endif
+
+.if defined(WITH_KRB5_RENAME_RLOGIN)
+MAN1:= ${MAN1:C/rlogin/krlogin/}
+PROGRAM_TRANSFORM_NAME+= s/^rlogin/krlogin/;
+PLIST_SUB+= RLOGIN_PROG="krlogin"
+.else
+PLIST_SUB+= RLOGIN_PROG="rlogin"
+.endif
+
+.if defined(WITH_KRB5_RENAME_RSH)
+MAN1:= ${MAN1:C/rsh/krsh/}
+PROGRAM_TRANSFORM_NAME+= s/^rsh/krsh/;
+PLIST_SUB+= RSH_PROG="krsh"
+.else
+PLIST_SUB+= RSH_PROG="rsh"
+.endif
+
+.if defined(WITH_KRB5_RENAME_RCP)
+MAN1:= ${MAN1:C/rcp/krcp/}
+PROGRAM_TRANSFORM_NAME+= s/^rcp/krcp/;
+PLIST_SUB+= RCP_PROG="krcp"
+.else
+PLIST_SUB+= RCP_PROG="rcp"
+.endif
+
+.if defined(WITH_KRB5_KRB4_COMPAT)
+MAN1+= krb524init.1 v4rcp.1
+.endif
+
+.if defined(PROGRAM_TRANSFORM_NAME) && ${PROGRAM_TRANSFORM_NAME} != ""
+CONFIGURE_ARGS+= --program-transform-name="${PROGRAM_TRANSFORM_NAME}"
+.endif
+
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
WANT_HTML?= YES
@@ -80,8 +135,6 @@ HTML_DOCS= ftp.html kdestroy.html kinit.html klist.html \
krb5-install.html krb5-user.html ksu.html \
rcp.html rlogin.html rsh.html telnet.html
-.include <bsd.port.pre.mk>
-
CONFIGURE_ARGS+= CPPFLAGS="-I${OPENSSLINC} -L${OPENSSLLIB}"
post-extract:
diff --git a/security/krb5/pkg-plist b/security/krb5/pkg-plist
index a58155f40b9b..1f5aa77cda2b 100644
--- a/security/krb5/pkg-plist
+++ b/security/krb5/pkg-plist
@@ -1,5 +1,5 @@
bin/compile_et
-bin/ftp
+bin/%%FTP_PROG%%
bin/gss-client
bin/kdestroy
bin/kinit
@@ -9,12 +9,12 @@ bin/krb5-config
%%KRB4%%bin/krb524init
bin/ksu
bin/kvno
-bin/rcp
-bin/rlogin
-bin/rsh
+bin/%%RCP_PROG%%
+bin/%%RLOGIN_PROG%%
+bin/%%RSH_PROG%%
bin/sclient
bin/sim_client
-bin/telnet
+bin/%%TELNET_PROG%%
bin/uuclient
%%KRB4%%bin/v4rcp
include/com_err.h
@@ -72,7 +72,7 @@ lib/libkrb5support.so
lib/libkrb5support.so.0
lib/krb5/plugins/kdb/db2.so
lib/krb5/plugins/preauth/pkinit.so
-sbin/ftpd
+sbin/%%FTP_PROG%%d
sbin/gss-server
sbin/k5srvutil
sbin/kadmin
@@ -90,7 +90,7 @@ sbin/ktutil
sbin/login.krb5
sbin/sim_server
sbin/sserver
-sbin/telnetd
+sbin/%%TELNET_PROG%%d
sbin/uuserver
share/doc/krb5/README.FreeBSD
share/et/et_c.awk