summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authoradrianp <adrianp>2007-12-16 01:49:08 +0000
committeradrianp <adrianp>2007-12-16 01:49:08 +0000
commitd6b2ae02384788933eaccfcc88b2af4ce50897f1 (patch)
tree461edf6def3a1214466f8c0b47e7c0a31d358db5 /mk
parent8f3725ab3238d3ed9ef7b28d0956728b3f3199db (diff)
downloadpkgsrc-d6b2ae02384788933eaccfcc88b2af4ce50897f1.tar.gz
audit-packages logic for its location depends on a variety of factors
including OS, pkg_install version and NetBSD version. The following should pick the correct version to run.
Diffstat (limited to 'mk')
-rw-r--r--mk/flavor/pkg/flavor-vars.mk20
1 files changed, 19 insertions, 1 deletions
diff --git a/mk/flavor/pkg/flavor-vars.mk b/mk/flavor/pkg/flavor-vars.mk
index cc18e6a373f..c2bbee4c680 100644
--- a/mk/flavor/pkg/flavor-vars.mk
+++ b/mk/flavor/pkg/flavor-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: flavor-vars.mk,v 1.4 2007/08/02 18:19:32 joerg Exp $
+# $NetBSD: flavor-vars.mk,v 1.5 2007/12/16 01:49:08 adrianp Exp $
#
# This Makefile fragment is included indirectly by bsd.prefs.mk and
# defines some variables which must be defined earlier than where
@@ -40,6 +40,24 @@ PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302
MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION}
.endif
+# audit-packages logic for its location depends on a variety of factors
+# including OS, pkg_install version and NetBSD version. The following
+# should pick the correct version to run.
+#
+.if defined(OPSYS) && ${OPSYS} != "NetBSD"
+AP?= ${PKG_TOOLS_BIN}/audit-packages
+.else
+. if exists(${LOCALBASE}/sbin/audit-packages)
+AP?= ${LOCALBASE}/sbin/audit-packages
+. else
+. if exists(/usr/sbin/audit-packages)
+AP?= /usr/sbin/audit-packages
+. else
+AP?= audit-packages
+. endif
+. endif
+.endif
+
# The binary pkg_install tools all need to consistently to refer to the
# correct package database directory.
#