common/hooks: new post-install hook to generate pkg gitrevs file.

This commit is contained in:
Juan RP
2014-03-02 08:33:28 +01:00
parent f6bbf499cc
commit 030f58909f
2 changed files with 43 additions and 1 deletions

View File

@@ -40,6 +40,9 @@ genpkg() {
if [ -s ${PKGDESTDIR}/shlib-requires ]; then
_shrequires="$(cat ${PKGDESTDIR}/shlib-requires)"
fi
if [ -s ${wrksrc}/.xbps_${sourcepkg}_git_revs ]; then
_gitrevs="$(cat ${wrksrc}/.xbps_${sourcepkg}_git_revs)"
fi
if [ -n "$provides" ]; then
local _provides=
@@ -92,7 +95,7 @@ genpkg() {
--built-with "xbps-src-${XBPS_SRC_VERSION}" \
--build-options "${PKG_BUILD_OPTIONS}" \
--pkgver "${pkgver}" --quiet \
--source-revisions "$(cat ${PKG_GITREVS_FILE:-/dev/null} 2>/dev/null)" \
--source-revisions "${_gitrevs}" \
--shlib-provides "${_shprovides}" \
--shlib-requires "${_shrequires}" \
${_preserve} ${_sourcerevs} ${PKGDESTDIR}