| @@ -1,97 +1,97 @@ | | | @@ -1,97 +1,97 @@ |
1 | # $NetBSD: pkgformat-vars.mk,v 1.9 2020/12/02 10:22:39 wiz Exp $ | | 1 | # $NetBSD: pkgformat-vars.mk,v 1.10 2020/12/03 10:04:48 wiz Exp $ |
2 | # | | 2 | # |
3 | # This Makefile fragment is included indirectly by bsd.prefs.mk and | | 3 | # This Makefile fragment is included indirectly by bsd.prefs.mk and |
4 | # defines some variables which must be defined earlier than where | | 4 | # defines some variables which must be defined earlier than where |
5 | # pkgformat.mk is included. | | 5 | # pkgformat.mk is included. |
6 | # | | 6 | # |
7 | | | 7 | |
8 | PKGSRC_MESSAGE_RECIPIENTS?= # empty | | 8 | PKGSRC_MESSAGE_RECIPIENTS?= # empty |
9 | | | 9 | |
10 | .if !empty(PKGSRC_MESSAGE_RECIPIENTS) | | 10 | .if !empty(PKGSRC_MESSAGE_RECIPIENTS) |
11 | USE_TOOLS+= mail | | 11 | USE_TOOLS+= mail |
12 | .endif | | 12 | .endif |
13 | | | 13 | |
14 | .if defined(PKG_PRESERVE) | | 14 | .if defined(PKG_PRESERVE) |
15 | USE_TOOLS+= date | | 15 | USE_TOOLS+= date |
16 | .endif | | 16 | .endif |
17 | | | 17 | |
18 | # This is the package database directory for the default view. | | 18 | # This is the package database directory for the default view. |
19 | PKG_DBDIR?= ${PREFIX}/pkgdb | | 19 | PKG_DBDIR?= ${LOCALBASE}/pkgdb |
20 | | | 20 | |
21 | .if exists(/var/db/pkg) && !exists(${PKG_DBDIR}) | | 21 | .if exists(/var/db/pkg) && !exists(${PKG_DBDIR}) |
22 | PKG_DBDIR_ERROR= The default package database directory has changed. Please run: mv /var/db/pkg ${PKG_DBDIR} | | 22 | PKG_DBDIR_ERROR= The default package database directory has changed. Please run: mv /var/db/pkg ${PKG_DBDIR} |
23 | .endif | | 23 | .endif |
24 | | | 24 | |
25 | # _PKG_DBDIR is the actual packages database directory where we register | | 25 | # _PKG_DBDIR is the actual packages database directory where we register |
26 | # packages. | | 26 | # packages. |
27 | # | | 27 | # |
28 | _PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} | | 28 | _PKG_DBDIR= ${_CROSS_DESTDIR}${PKG_DBDIR} |
29 | _HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} | | 29 | _HOST_PKG_DBDIR= ${HOST_PKG_DBDIR:U${PKG_DBDIR}} |
30 | | | 30 | |
31 | PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add | | 31 | PKG_ADD_CMD?= ${PKG_TOOLS_BIN}/pkg_add |
32 | PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin | | 32 | PKG_ADMIN_CMD?= ${PKG_TOOLS_BIN}/pkg_admin |
33 | PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create | | 33 | PKG_CREATE_CMD?= ${PKG_TOOLS_BIN}/pkg_create |
34 | PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete | | 34 | PKG_DELETE_CMD?= ${PKG_TOOLS_BIN}/pkg_delete |
35 | PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info | | 35 | PKG_INFO_CMD?= ${PKG_TOOLS_BIN}/pkg_info |
36 | LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm | | 36 | LINKFARM_CMD?= ${PKG_TOOLS_BIN}/linkfarm |
37 | | | 37 | |
38 | # Latest versions of tools required for correct pkgsrc operation. | | 38 | # Latest versions of tools required for correct pkgsrc operation. |
39 | PKGTOOLS_REQD= 20200828 | | 39 | PKGTOOLS_REQD= 20200828 |
40 | # Latest version of pkg_install required to extract packages | | 40 | # Latest version of pkg_install required to extract packages |
41 | PKGTOOLS_VERSION_REQD= 20091115 | | 41 | PKGTOOLS_VERSION_REQD= 20091115 |
42 | | | 42 | |
43 | # Environment used when invoking package tools. This is used to pass | | 43 | # Environment used when invoking package tools. This is used to pass |
44 | # environment variables to the package install and deinstall scripts. | | 44 | # environment variables to the package install and deinstall scripts. |
45 | # | | 45 | # |
46 | PKGTOOLS_ENV?= # empty | | 46 | PKGTOOLS_ENV?= # empty |
47 | | | 47 | |
48 | .if !defined(PKGTOOLS_VERSION) | | 48 | .if !defined(PKGTOOLS_VERSION) |
49 | PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302 | | 49 | PKGTOOLS_VERSION!= ${PKG_INFO_CMD} -V 2>/dev/null || echo 20010302 |
50 | MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION} | | 50 | MAKEFLAGS+= PKGTOOLS_VERSION=${PKGTOOLS_VERSION} |
51 | .endif | | 51 | .endif |
52 | | | 52 | |
53 | # Check that we are using up-to-date pkg_* tools with this file. | | 53 | # Check that we are using up-to-date pkg_* tools with this file. |
54 | .if !defined(NO_PKGTOOLS_REQD_CHECK) && ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD} | | 54 | .if !defined(NO_PKGTOOLS_REQD_CHECK) && ${PKGTOOLS_VERSION} < ${PKGTOOLS_REQD} |
55 | BOOTSTRAP_DEPENDS+= pkg_install>=${PKGTOOLS_REQD}:../../pkgtools/pkg_install | | 55 | BOOTSTRAP_DEPENDS+= pkg_install>=${PKGTOOLS_REQD}:../../pkgtools/pkg_install |
56 | _PKG_INSTALL_DEPENDS= yes | | 56 | _PKG_INSTALL_DEPENDS= yes |
57 | .endif | | 57 | .endif |
58 | | | 58 | |
59 | AUDIT_PACKAGES?= ${PKG_ADMIN} | | 59 | AUDIT_PACKAGES?= ${PKG_ADMIN} |
60 | _AUDIT_PACKAGES_CMD?= audit-pkg | | 60 | _AUDIT_PACKAGES_CMD?= audit-pkg |
61 | _EXTRACT_PKGVULNDIR= ${PKG_ADMIN} config-var PKGVULNDIR | | 61 | _EXTRACT_PKGVULNDIR= ${PKG_ADMIN} config-var PKGVULNDIR |
62 | DOWNLOAD_VULN_LIST?= ${PKG_ADMIN} fetch-pkg-vulnerabilities | | 62 | DOWNLOAD_VULN_LIST?= ${PKG_ADMIN} fetch-pkg-vulnerabilities |
63 | _AUDIT_CONFIG_FILE= pkg_install.conf | | 63 | _AUDIT_CONFIG_FILE= pkg_install.conf |
64 | _AUDIT_CONFIG_OPTION= IGNORE_URL | | 64 | _AUDIT_CONFIG_OPTION= IGNORE_URL |
65 | | | 65 | |
66 | # The binary pkg_install tools all need to consistently to refer to the | | 66 | # The binary pkg_install tools all need to consistently to refer to the |
67 | # correct package database directory. | | 67 | # correct package database directory. |
68 | # | | 68 | # |
69 | PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} | | 69 | PKGTOOLS_ARGS?= -K ${_PKG_DBDIR} |
70 | HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR} | | 70 | HOST_PKGTOOLS_ARGS?= -K ${_HOST_PKG_DBDIR} |
71 | | | 71 | |
72 | PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} | | 72 | PKG_ADD?= ${PKG_ADD_CMD} ${PKGTOOLS_ARGS} |
73 | PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} | | 73 | PKG_ADMIN?= ${PKG_ADMIN_CMD} ${PKGTOOLS_ARGS} |
74 | PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} | | 74 | PKG_CREATE?= ${PKG_CREATE_CMD} ${PKGTOOLS_ARGS} |
75 | PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} | | 75 | PKG_DELETE?= ${PKG_DELETE_CMD} ${PKGTOOLS_ARGS} |
76 | PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} | | 76 | PKG_INFO?= ${PKG_INFO_CMD} ${PKGTOOLS_ARGS} |
77 | LINKFARM?= ${LINKFARM_CMD} | | 77 | LINKFARM?= ${LINKFARM_CMD} |
78 | | | 78 | |
79 | HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS} | | 79 | HOST_PKG_ADD?= ${PKG_ADD_CMD} ${HOST_PKGTOOLS_ARGS} |
80 | HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS} | | 80 | HOST_PKG_ADMIN?= ${PKG_ADMIN_CMD} ${HOST_PKGTOOLS_ARGS} |
81 | HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS} | | 81 | HOST_PKG_CREATE?= ${PKG_CREATE_CMD} ${HOST_PKGTOOLS_ARGS} |
82 | HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS} | | 82 | HOST_PKG_DELETE?= ${PKG_DELETE_CMD} ${HOST_PKGTOOLS_ARGS} |
83 | HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS} | | 83 | HOST_PKG_INFO?= ${PKG_INFO_CMD} ${HOST_PKGTOOLS_ARGS} |
84 | HOST_LINKFARM?= ${LINKFARM_CMD} | | 84 | HOST_LINKFARM?= ${LINKFARM_CMD} |
85 | | | 85 | |
86 | # "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed | | 86 | # "${_PKG_BEST_EXISTS} pkgpattern" prints out the name of the installed |
87 | # package that best matches pkgpattern. Use this instead of | | 87 | # package that best matches pkgpattern. Use this instead of |
88 | # "${PKG_INFO} -e pkgpattern" if the latter would return more than one | | 88 | # "${PKG_INFO} -e pkgpattern" if the latter would return more than one |
89 | # package name. | | 89 | # package name. |
90 | # | | 90 | # |
91 | _PKG_BEST_EXISTS?= ${PKG_INFO} -E | | 91 | _PKG_BEST_EXISTS?= ${PKG_INFO} -E |
92 | _HOST_PKG_BEST_EXISTS?= ${HOST_PKG_INFO} -E | | 92 | _HOST_PKG_BEST_EXISTS?= ${HOST_PKG_INFO} -E |
93 | | | 93 | |
94 | # XXX Leave this here until all uses of this have been purged from the | | 94 | # XXX Leave this here until all uses of this have been purged from the |
95 | # XXX public parts of pkgsrc. | | 95 | # XXX public parts of pkgsrc. |
96 | # XXX | | 96 | # XXX |
97 | PKG_BEST_EXISTS= ${_PKG_BEST_EXISTS} | | 97 | PKG_BEST_EXISTS= ${_PKG_BEST_EXISTS} |