diff options
author | jlam <jlam> | 2005-01-13 23:00:06 +0000 |
---|---|---|
committer | jlam <jlam> | 2005-01-13 23:00:06 +0000 |
commit | a3b3372326e5e74edd233619ef0ee51e04c1bfaa (patch) | |
tree | d5d4db2bc54e1d465a74c099775308c660f971c7 | |
parent | fe6aaac717f9f01a6beec53189d8eb517abc143c (diff) | |
download | pkgsrc-a3b3372326e5e74edd233619ef0ee51e04c1bfaa.tar.gz |
Add a builtin.mk file to check for a built-in version of openpam and to
associate it with a PKGNAME.
-rw-r--r-- | security/openpam/builtin.mk | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/security/openpam/builtin.mk b/security/openpam/builtin.mk new file mode 100644 index 00000000000..196ddd3c7bd --- /dev/null +++ b/security/openpam/builtin.mk @@ -0,0 +1,40 @@ +# $NetBSD: builtin.mk,v 1.1 2005/01/13 23:00:06 jlam Exp $ + +_SECURITY_OPENPAM_VERSION_H= /usr/include/security/openpam_version.h + +.if !defined(IS_BUILTIN.openapm) +IS_BUILTIN.openpam= no +. if empty(_SECURITY_OPENPAM_VERSION_H:M${LOCALBASE}/*) && \ + exists(${_SECURITY_OPENPAM_VERSION_H}) +IS_BUILTIN.openpam= yes +# +# Create an appropriate package name for the built-in software +# distributed with the system. This package name can be used to check +# against BUILDLINK_DEPENDS.<pkg> to see if we need to install the +# pkgsrc version or if the built-in one is sufficient. +# +_OPENPAM_VERSION!= ${AWK} '/\#define[ ]*_OPENPAM_VERSION[ ]/ {print $$3; }' ${_SECURITY_OPENPAM_VERSION_H} +BUILTIN_PKG.openpam= openpam-${_OPENPAM_VERSION} +BUILDLINK_VARS+= BUILTIN_PKG.openpam +. endif +BUILDLINK_VARS+= IS_BUILTIN.openpam +.endif # IS_BUILTIN.openpam + +.if !defined(USE_BUILTIN.openpam) +USE_BUILTIN.openpam?= ${IS_BUILTIN.openpam} + +. if defined(BUILTIN_PKG.openpam) +USE_BUILTIN.openpam= yes +. for _depend_ in ${BUILDLINK_DEPENDS.openpam} +. if !empty(USE_BUILTIN.openpam:M[yY][eE][sS]) +USE_BUILTIN.openpam!= \ + if ${PKG_ADMIN} pmatch '${_depend_}' ${BUILTIN_PKG.openpam}; then \ + ${ECHO} "yes"; \ + else \ + ${ECHO} "no"; \ + fi +. endif +. endfor +. endif +BUILDLINK_VARS+= USE_BUILTIN.openpam +.endif # USE_BUILTIN.openpam |