2006-04-10 17:04:44 +02:00
|
|
|
# $NetBSD: krb5.buildlink3.mk,v 1.9 2006/04/10 15:04:44 tron Exp $
|
2004-01-10 20:50:57 +01:00
|
|
|
#
|
|
|
|
# This Makefile fragment is meant to be included by packages that
|
|
|
|
# require a Kerberos 5 implementation. krb5.buildlink3.mk will:
|
|
|
|
#
|
|
|
|
# * set KRB5BASE to the base directory of the Kerberos 5 files;
|
|
|
|
# * set KRB5_TYPE to the Kerberos 5 implementation used.
|
|
|
|
#
|
|
|
|
# There are two variables that can be used to tweak the selection of
|
|
|
|
# the Kerberos 5 implementation:
|
|
|
|
#
|
|
|
|
# KRB5_DEFAULT is a user-settable variable whose value is the default
|
|
|
|
# Kerberos 5 implementation to use.
|
|
|
|
#
|
|
|
|
# KRB5_ACCEPTED is a package-settable list of Kerberos 5 implementations
|
|
|
|
# that may be used by the package.
|
2004-01-10 16:29:34 +01:00
|
|
|
|
|
|
|
KRB5_BUILDLINK3_MK:= ${KRB5_BUILDLINK3_MK}+
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2004-03-18 10:12:08 +01:00
|
|
|
.if !empty(KRB5_BUILDLINK3_MK:M+)
|
2006-04-10 17:04:44 +02:00
|
|
|
.if ${OPSYS} != Darwin
|
2005-01-10 00:59:26 +01:00
|
|
|
KRB5_DEFAULT?= heimdal
|
2006-04-10 17:04:44 +02:00
|
|
|
.else
|
|
|
|
KRB5_DEFAULT?= mit-krb5
|
|
|
|
.endif
|
2004-01-10 16:29:34 +01:00
|
|
|
KRB5_ACCEPTED?= ${_KRB5_PKGS}
|
|
|
|
|
|
|
|
# This is an exhaustive list of all of the Kerberos 5 implementations
|
|
|
|
# that may be used with krb5.buildlink3.mk, in order of precedence.
|
|
|
|
#
|
2004-03-30 20:09:43 +02:00
|
|
|
_KRB5_PKGS?= heimdal mit-krb5
|
2004-01-10 16:29:34 +01:00
|
|
|
|
|
|
|
_KRB5_DEFAULT= ${KRB5_DEFAULT}
|
|
|
|
_KRB5_ACCEPTED= ${KRB5_ACCEPTED}
|
|
|
|
|
2005-01-10 00:59:26 +01:00
|
|
|
_KRB5_TYPE?= ${_KRB5_DEFAULT}
|
2004-01-10 16:29:34 +01:00
|
|
|
|
2005-01-10 00:59:26 +01:00
|
|
|
. if !empty(_KRB5_ACCEPTED:M${_KRB5_TYPE})
|
|
|
|
KRB5_TYPE= ${_KRB5_TYPE}
|
|
|
|
. else
|
|
|
|
KRB5_TYPE= none
|
2004-01-10 16:29:34 +01:00
|
|
|
. endif
|
2005-01-10 00:59:26 +01:00
|
|
|
KRB5BASE= ${BUILDLINK_PREFIX.${KRB5_TYPE}}
|
2004-01-10 16:29:34 +01:00
|
|
|
|
|
|
|
BUILD_DEFS+= KRB5_TYPE
|
2005-01-10 00:59:26 +01:00
|
|
|
BUILD_DEFS+= KRB5BASE
|
2004-01-10 16:29:34 +01:00
|
|
|
|
2004-01-21 14:09:31 +01:00
|
|
|
# Packages that use Kerberos are automatically categorized as restricted
|
|
|
|
# packages.
|
|
|
|
#
|
2004-02-02 12:34:17 +01:00
|
|
|
CRYPTO+= uses Kerberos encryption code
|
2005-01-10 00:59:26 +01:00
|
|
|
|
|
|
|
.endif # KRB5_BUILDLINK3_MK
|
|
|
|
|
|
|
|
.if ${KRB5_TYPE} == "none"
|
|
|
|
PKG_FAIL_REASON= \
|
|
|
|
"${_KRB5_TYPE} is not an acceptable Kerberos 5 type for ${PKGNAME}."
|
|
|
|
.elif ${KRB5_TYPE} == "heimdal"
|
|
|
|
. include "../../security/heimdal/buildlink3.mk"
|
|
|
|
.elif ${KRB5_TYPE} == "mit-krb5"
|
|
|
|
. include "../../security/mit-krb5/buildlink3.mk"
|
2004-03-18 10:12:08 +01:00
|
|
|
.endif
|