diff options
author | joerg <joerg@pkgsrc.org> | 2009-07-24 06:54:37 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2009-07-24 06:54:37 +0000 |
commit | 1867b3cb4c39920411d887fa4678ca8198118dda (patch) | |
tree | 9e052032fb31941075e025bbad3493bdbe7cecba /mk/flavor | |
parent | db62b7472e0f741f888dee9675489addc922f04e (diff) | |
download | pkgsrc-1867b3cb4c39920411d887fa4678ca8198118dda.tar.gz |
Compute +SIZE_ALL as documented in pkg_info(1). Addresses PR 41767.
Diffstat (limited to 'mk/flavor')
-rw-r--r-- | mk/flavor/pkg/metadata.mk | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/mk/flavor/pkg/metadata.mk b/mk/flavor/pkg/metadata.mk index e295cde6677..4c7a5de4f1e 100644 --- a/mk/flavor/pkg/metadata.mk +++ b/mk/flavor/pkg/metadata.mk @@ -1,4 +1,4 @@ -# $NetBSD: metadata.mk,v 1.31 2009/05/02 16:14:37 reed Exp $ +# $NetBSD: metadata.mk,v 1.32 2009/07/24 06:54:37 joerg Exp $ ###################################################################### ### The targets below are all PRIVATE. @@ -267,24 +267,6 @@ ${_PRESERVE_FILE}: ###################################################################### ### -### +SIZE_ALL - Package size-of-dependencies file -### -### This is the total size of the dependencies that this package was -### built against. -### -_SIZE_ALL_FILE= ${PKG_DB_TMPDIR}/+SIZE_ALL -_METADATA_TARGETS+= ${_SIZE_ALL_FILE} - -${_SIZE_ALL_FILE}: ${_RDEPENDS_FILE} - ${RUN}${MKDIR} ${.TARGET:H} - ${RUN} \ - ${_FULL_DEPENDS_CMD} | ${SORT} -u | \ - ${XARGS} -n 256 ${PKG_INFO} -qs | \ - ${AWK} 'BEGIN { s = 0 } /^[0-9]+$$/ { s += $$1 } END { print s }' \ - > ${.TARGET} - -###################################################################### -### ### +SIZE_PKG - Package size file ### ### This is the total size of the files contained in the package. @@ -308,6 +290,27 @@ ${_SIZE_PKG_FILE}: plist ###################################################################### ### +### +SIZE_ALL - Package size-of-dependencies file +### +### This is the total size of the dependencies that this package was +### built against and the package itself. +### +_SIZE_ALL_FILE= ${PKG_DB_TMPDIR}/+SIZE_ALL +_METADATA_TARGETS+= ${_SIZE_ALL_FILE} + +${_SIZE_ALL_FILE}: ${_RDEPENDS_FILE} ${_SIZE_PKG_FILE} + ${RUN}${MKDIR} ${.TARGET:H} + ${RUN} \ + { \ + ${CAT} ${_SIZE_PKG_FILE} && \ + ${_FULL_DEPENDS_CMD} | ${SORT} -u | \ + ${XARGS} -n 256 ${PKG_INFO} -qs; \ + } | \ + ${AWK} 'BEGIN { s = 0 } /^[0-9]+$$/ { s += $$1 } END { print s }' \ + > ${.TARGET} + +###################################################################### +### ### +CONTENTS - Package manifest file ### ### This file contains the list of files and checksums, along with |