1 # $NetBSD: pkgformat-vars.mk,v 1.2 2011/12/13 16:35:48 joerg Exp $
3 # This Makefile fragment is included indirectly by bsd.prefs.mk and
4 # defines some variables which must be defined earlier than where
5 # pkgformat.mk is included.
8 PKGSRC_MESSAGE_RECIPIENTS?
= # empty
10 .if
!empty
(PKGSRC_MESSAGE_RECIPIENTS
)
14 .if defined
(PKG_PRESERVE
)
18 # This is the package database directory for the default view.
19 PKG_DBDIR?
= /var
/db
/pkg
21 # _PKG_DBDIR is the actual packages database directory where we register
24 .if
${PKG_INSTALLATION_TYPE} == "overwrite"
25 _PKG_DBDIR
= ${_CROSS_DESTDIR}${PKG_DBDIR}
26 _HOST_PKG_DBDIR
= ${HOST_PKG_DBDIR
:U
${PKG_DBDIR}}
27 .elif
${PKG_INSTALLATION_TYPE} == "pkgviews"
28 _PKG_DBDIR
= ${_CROSS_DESTDIR}${DEPOTBASE}
29 _HOST_PKG_DBDIR
= ${HOST_DEPOTBASE
:U
${DEPOTBASE}}
32 PKG_ADD_CMD?
= ${PKG_TOOLS_BIN}/pkg_add
33 PKG_ADMIN_CMD?
= ${PKG_TOOLS_BIN}/pkg_admin
34 PKG_CREATE_CMD?
= ${PKG_TOOLS_BIN}/pkg_create
35 PKG_DELETE_CMD?
= ${PKG_TOOLS_BIN}/pkg_delete
36 PKG_INFO_CMD?
= ${PKG_TOOLS_BIN}/pkg_info
37 PKG_VIEW_CMD?
= ${PKG_TOOLS_BIN}/pkg_view
38 LINKFARM_CMD?
= ${PKG_TOOLS_BIN}/linkfarm
40 # Latest versions of tools required for correct pkgsrc operation.
41 .if make
(replace
) && ${_USE_DESTDIR} != "no"
42 PKGTOOLS_REQD
= 20100914
44 PKGTOOLS_REQD
= 20090528
47 # Latest version of pkg_install required to extract packages
48 PKGTOOLS_VERSION_REQD
= 20091115
50 .if
!defined
(PKGTOOLS_VERSION
)
51 PKGTOOLS_VERSION
!= ${PKG_INFO_CMD} -V
2>/dev
/null || echo
20010302
52 MAKEFLAGS
+= PKGTOOLS_VERSION
=${PKGTOOLS_VERSION}
55 # Check that we are using up-to-date pkg_* tools with this file.
56 .if
!defined
(NO_PKGTOOLS_REQD_CHECK
) && ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD}
57 BOOTSTRAP_DEPENDS
+= pkg_install
>=${PKGTOOLS_REQD}:..
/..
/pkgtools
/pkg_install
58 _PKG_INSTALL_DEPENDS
= yes
61 AUDIT_PACKAGES?
= ${PKG_ADMIN}
62 _AUDIT_PACKAGES_CMD?
= audit-pkg
63 _EXTRACT_PKGVULNDIR
= ${PKG_ADMIN} config-var PKGVULNDIR
64 DOWNLOAD_VULN_LIST?
= ${PKG_ADMIN} fetch-pkg-vulnerabilities
65 _AUDIT_CONFIG_FILE
= pkg_install.conf
66 _AUDIT_CONFIG_OPTION
= IGNORE_URL
68 # The binary pkg_install tools all need to consistently to refer to the
69 # correct package database directory.
71 PKGTOOLS_ARGS?
= -K
${_PKG_DBDIR}
72 HOST_PKGTOOLS_ARGS?
= -K
${_HOST_PKG_DBDIR}
74 # Views are rooted in ${LOCALBASE}, all packages are depoted in
75 # ${DEPOTBASE}, and the package database directory for the default view
78 PKG_VIEW_ARGS?
= -W
${LOCALBASE} -d
${DEPOTBASE} -k
${_CROSS_DESTDIR}${PKG_DBDIR}
79 HOST_PKG_VIEW_ARGS?
= -W
${LOCALBASE} -d
${DEPOTBASE} -k
${PKG_DBDIR}
81 PKG_ADD?
= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS}
82 PKG_ADMIN?
= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS}
83 PKG_CREATE?
= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS}
84 PKG_DELETE?
= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS}
85 PKG_INFO?
= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS}
86 PKG_VIEW?
= ${PKG_VIEW_CMD} ${PKG_VIEW_ARGS}
87 LINKFARM?
= ${LINKFARM_CMD}
89 HOST_PKG_ADD?
= ${PKG_ADD_CMD} ${HOST-PKGTOOLS_ARGS
}
90 HOST_PKG_ADMIN?
= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS}
91 HOST_PKG_CREATE?
= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS}
92 HOST_PKG_DELETE?
= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS}
93 HOST_PKG_INFO?
= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS}
94 HOST_PKG_VIEW?
= ${PKG_VIEW_CMD} ${HOST_PKG_VIEW_ARGS}
95 HOST_LINKFARM?
= ${LINKFARM_CMD}
97 # "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed
98 # package that best matches pkgpattern. Use this instead of
99 # "${PKG_INFO} -e pkgpattern" if the latter would return more than one
102 _PKG_BEST_EXISTS?
= ${PKG_INFO} -E
103 _HOST_PKG_BEST_EXISTS?
= ${HOST_PKG_INFO} -E
105 # XXX Leave this here until all uses of this have been purged from the
106 # XXX public parts of pkgsrc.
108 PKG_BEST_EXISTS
= ${_PKG_BEST_EXISTS}