2014-02-12 12:55:42 +01:00
|
|
|
# This hook generates XBPS configuration files for virtual packages.
|
|
|
|
|
|
|
|
hook() {
|
|
|
|
local _tmpf
|
|
|
|
|
|
|
|
# If package provides virtual packages, create dynamically the
|
|
|
|
# required configuration file.
|
|
|
|
if [ -n "$provides" ]; then
|
|
|
|
_tmpf=$(mktemp) || msg_error "$pkgver: failed to create tempfile.\n"
|
|
|
|
echo "# Virtual packages provided by '${pkgname}':" >>${_tmpf}
|
|
|
|
for f in ${provides}; do
|
2014-03-11 13:17:09 +01:00
|
|
|
echo "virtualpkg=${f}:${pkgname}" >>${_tmpf}
|
2014-02-12 12:55:42 +01:00
|
|
|
done
|
2014-06-10 09:27:52 +02:00
|
|
|
install -Dm644 ${_tmpf} ${PKGDESTDIR}/usr/share/xbps/virtualpkg.d/${pkgname}.conf
|
2014-02-12 12:55:42 +01:00
|
|
|
rm -f ${_tmpf}
|
|
|
|
fi
|
|
|
|
}
|