1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
# Created by: nectar@FreeBSD.org
# $FreeBSD$
PORTNAME= krb5
PORTVERSION= 1.12.4
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://web.mit.edu/kerberos/dist/${PORTNAME}/${PORTVERSION:C/^[0-9]*\.[0-9]*/&X/:C/X\.[0-9]*$//:C/X//}/
PKGNAMESUFFIX= -112
DISTNAME= ${PORTNAME}-${PORTVERSION}-signed
EXTRACT_SUFX= .tar
PATCH_SITES= http://web.mit.edu/kerberos/advisories/
PATCH_DIST_STRIP= -p2
MAINTAINER= cy@FreeBSD.org
COMMENT= Authentication system developed at MIT, successor to Kerberos IV
LICENSE= MIT
BUILD_DEPENDS= gm4:${PORTSDIR}/devel/m4
CONFLICTS= heimdal-[0-9]* srp-[0-9]* krb5-[0-9]* krb5-maint-111-*
KERBEROSV_URL= http://web.mit.edu/kerberos/
USE_PERL5= build
USE_LDCONFIG= yes
USE_CSTD= gnu99
GNU_CONFIGURE= yes
USES= cpe gettext gmake perl5 libtool:build \
gssapi:boostrap,mit
CONFIGURE_ARGS?= --enable-shared --without-system-verto \
--disable-rpath --localstatedir="${PREFIX}/var"
CONFIGURE_ENV= INSTALL="${INSTALL}" INSTALL_LIB="${INSTALL_LIB}" YACC="${YACC}"
MAKE_ARGS= INSTALL="${INSTALL}" INSTALL_LIB="${INSTALL_LIB}"
CPE_VENDOR= mit
CPE_VERSION= 5-${PORTVERSION}
CPE_PRODUCT= kerberos
OPTIONS_DEFINE= KRB5_PDF KRB5_HTML DNS_FOR_REALM LDAP READLINE
OPTIONS_DEFAULT= KRB5_PDF KRB5_HTML
KRB5_PDF_DESC= Install krb5 PDF documentation
KRB5_HTML_DESC= Install krb5 HTML documentation
DNS_FOR_REALM_DESC= Enable DNS lookups for Kerberos realm names
LDAP= Enable LDAP support
.if defined(KRB5_HOME)
PREFIX= ${KRB5_HOME}
.endif
CPPFLAGS+= -I${LOCALBASE}/include -I${OPENSSLINC}
LDFLAGS+= -L${LOCALBASE}/lib -L${OPENSSLLIB}
USE_OPENSSL= yes
USE_RC_SUBR= kpropd
.include <bsd.port.pre.mk>
# Fix up -Wl,-rpath in LDFLAGS
.if !empty(KRB5_HOME)
_RPATH= ${KRB5_HOME}/lib:
.else
_RPATH= ${LOCALBASE}/lib:
.endif
.if !empty(LDFLAGS:M-Wl,-rpath,*)
.for F in ${LDFLAGS:M-Wl,-rpath,*}
LDFLAGS:= -Wl,-rpath,${_RPATH}${F:S/-Wl,-rpath,//} \
${LDFLAGS:N-Wl,-rpath,*}
.endfor
.endif
.if defined(KRB5_HOME) && ${KRB5_HOME} != ${LOCALBASE}
BROKEN= LIB_DEPENDS when using KRB5_HOME is broken
.endif
.if ${PORT_OPTIONS:MDNS_FOR_REALM}
CONFIGURE_ARGS+= --enable-dns-for-realm
.endif
.if ${PORT_OPTIONS:MLDAP}
USE_OPENLDAP= yes
CONFIGURE_ARGS+= --with-ldap
PLIST_SUB+= LDAP=""
.else
PLIST_SUB+= LDAP="@comment "
.endif
.if ${PORT_OPTIONS:MREADLINE}
.if ${OSVERSION} >= 1100000
# libtool has some gas with libreadline in 11-CURRENT.
BUILD_DEPENDS+= libreadline.so:${PORTSDIR}/devel/readline
LIB_DEPENDS+= libreadline.so:${PORTSDIR}/devel/readline
.else
USES+= readline:port
CONFIGURE_ARGS+= --with-readline
.endif
.endif
.if defined(PROGRAM_TRANSFORM_NAME) && ${PROGRAM_TRANSFORM_NAME} != ""
CONFIGURE_ARGS+= --program-transform-name="${PROGRAM_TRANSFORM_NAME}"
.endif
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/src
HTML_DOC_DIR= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc/html
PDF_DOC_DIR= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/doc/pdf
post-extract:
@${TAR} -C ${WRKDIR} -xzf ${WRKDIR}/${PORTNAME}-${PORTVERSION}.tar.gz --no-same-owner --no-same-permissions
@${RM} ${WRKDIR}/${PORTNAME}-${PORTVERSION}.tar.gz ${WRKDIR}/${PORTNAME}-${PORTVERSION}.tar.gz.asc
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/krb5
# html documentation
.if ${PORT_OPTIONS:MKRB5_PDF}
pdf_files=`${FIND} ${PDF_DOC_DIR} ! -type d`
pdf_dirs=`${FIND} ${PDF_DOC_DIR} -type d`
for i in $${pdf_dirs}; do \
${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/krb5/$${i}; \
done; \
for i in $${pdf_files}; do \
${INSTALL_MAN} $${pdf} ${PREFIX}/share/doc/krb5/$${i}; \
${ECHO_CMD} share/doc/krb5/$${i} >> ${TMPPLIST}; \
done
.endif
.if ${PORT_OPTIONS:MKRB5_HTML}
html_files=`${FIND} ${HTML_DOC_DIR} ! -type d | ${GREP} -v /_sources`
html_dirs=`${FIND} ${HTML_DOC_DIR} -type d | ${GREP} -v /_sources`
for i in $${html_dirs}; do \
${MKDIR} ${PREFIX}/share/doc/krb5/$${i}; \
done; \
for i in $${html_files}; do \
${INSTALL_MAN} $${i} ${PREFIX}/share/doc/krb5/$${i}; \
${ECHO_CMD} share/doc/krb5/$${i} >> ${TMPPLIST}; \
done
.endif
.if ${PORT_OPTIONS:MKRB5_PDF}
for i in $${pdf_dirs}; do \
${ECHO_CMD} @dir share/doc/krb5/$${i} >> ${TMPPLIST}; \
done | ${TAIL} -r >> ${TMPPLIST}
.endif
.if ${PORT_OPTIONS:MKRB5_HTML}
for i in $${html_dirs}; do \
${ECHO_CMD} @dir share/doc/krb5/$${i} >> ${TMPPLIST}; \
done | ${TAIL} -r >> ${TMPPLIST}
.endif
${ECHO_CMD} @dir share/doc/krb5 >> ${TMPPLIST}
@${SED} "s%\${PREFIX}%${PREFIX}%" ${FILESDIR}/README.FreeBSD > ${STAGEDIR}${PREFIX}/share/doc/krb5/README.FreeBSD
@${CHMOD} 444 ${STAGEDIR}${PREFIX}/share/doc/krb5/README.FreeBSD
@${ECHO} "------------------------------------------------------"
@${ECHO} "This port of MIT Kerberos 5 includes remote login "
@${ECHO} "daemons (telnetd and klogind). These daemons default "
@${ECHO} "to using the system login program (/usr/bin/login). "
@${ECHO} "Please see the file "
@${ECHO} "${PREFIX}/share/doc/krb5/README.FreeBSD"
@${ECHO} "for more information. "
@${ECHO} "------------------------------------------------------"
.include <bsd.port.post.mk>
|