comon/hooks: update pkg hooks to also create/register -dbg pkgs.

This commit is contained in:
Juan RP 2014-03-02 06:30:25 +01:00
parent 0acd78cd00
commit b3200722ef
2 changed files with 38 additions and 11 deletions

View file

@ -1,6 +1,6 @@
# This hook generates a XBPS binary package from an installed package in destdir.
hook() {
genpkg() {
local binpkg= pkgdir= arch= _deps= f=
if [ ! -d "${PKGDESTDIR}" ]; then
@ -124,3 +124,17 @@ hook() {
msg_normal "Created binary package successfully: ${binpkg}\n"
}
hook() {
genpkg
# Generate -dbg pkg.
if [ -d "$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${pkgname}-dbg-${version}" ]; then
reset_subpkg_vars
pkgname="${pkgname}-dbg"
pkgver="${pkgname}-${version}_${revision}"
short_desc+=" (debug files)"
PKGDESTDIR="$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${pkgname}-${version}"
genpkg
fi
}