Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / heimdal / options.mk
blobafd0dd92334548e03790d5e6f06c5d01383daee5
1 # $NetBSD: options.mk,v 1.2 2008/04/12 22:43:10 jlam Exp $
3 PKG_OPTIONS_VAR= PKG_OPTIONS.heimdal
4 PKG_SUPPORTED_OPTIONS= inet6 kerberos-prefix-cmds ldap
5 PKG_SUGGESTED_OPTIONS= inet6
7 .include "../../mk/bsd.options.mk"
9 ###
10 ### IPv6 support.
11 ###
12 .if !empty(PKG_OPTIONS:Minet6)
13 CONFIGURE_ARGS+= --with-ipv6
14 .else
15 CONFIGURE_ARGS+= --without-ipv6
16 .endif
18 ###
19 ### Support using LDAP as a KDC backend.
20 ###
21 PLIST_VARS+= ldap
22 .if !empty(PKG_OPTIONS:Mldap)
23 . include "../../databases/openldap-client/buildlink3.mk"
24 CONFIGURE_ARGS+= --with-openldap=${BUILDLINK_PREFIX.openldap-client}
25 PLIST.ldap= yes
26 INSTALLATION_DIRS+= share/examples/heimdal
28 post-install: heimdal-ldap-schema
29 heimdal-ldap-schema:
30 ${INSTALL_DATA} ${WRKSRC}/lib/hdb/hdb.schema \
31 ${DESTDIR}${PREFIX}/share/examples/heimdal
32 .endif
34 ###
35 ### Rename some of Heimdal's applications so they won't conflict with
36 ### other packages.
37 ###
38 .if !empty(PKG_OPTIONS:Mkerberos-prefix-cmds)
39 KRB5_PREFIX= k
40 HEIMDAL_TRANSFORM= s/^ftp/${KRB5_PREFIX}&/; \
41 s/^login/${KRB5_PREFIX}&/; \
42 s/^${KRB5_PREFIX}login.access/login.access/; \
43 s/^rcp/${KRB5_PREFIX}&/; \
44 s/^rsh/${KRB5_PREFIX}&/; \
45 s/^su/${KRB5_PREFIX}&/; \
46 s/^telnet/${KRB5_PREFIX}&/
47 .else
48 KRB5_PREFIX= # empty
49 HEIMDAL_TRANSFORM= s/^ftp/k&/
50 .endif
52 PLIST_SUBST+= KRB5_PREFIX=${KRB5_PREFIX:Q}
53 CONFIGURE_ARGS+= --program-transform-name=${HEIMDAL_TRANSFORM:Q}
55 # Fix some places in the Heimdal sources that don't point to the correct
56 # Kerberized binaries when exec'ing programs.
58 SUBST_CLASSES+= heimdal
59 SUBST_STAGE.heimdal= pre-configure
60 SUBST_FILES.heimdal= appl/rcp/rcp.c appl/rcp/rcp_locl.h
61 SUBST_FILES.heimdal+= appl/rsh/rsh_locl.h
62 SUBST_FILES.heimdal+= appl/telnet/telnetd/telnetd.h
63 SUBST_SED.heimdal= -e "/RSH_PROGRAM/s,rsh,${KRB5_PREFIX}rsh,g"
64 SUBST_SED.heimdal+= -e "/PATH_RSH/s,\"/usr/bin/rsh\",BINDIR \"${KRB5_PREFIX}rsh\",g"
65 SUBST_SED.heimdal+= -e "/PATH_RSH/s,/rsh,/${KRB5_PREFIX}rsh,g"
66 SUBST_SED.heimdal+= -e "/PATH_LOGIN/s,/login,/${KRB5_PREFIX}login,g"