Provide some vars for use in template's targets.

These new vars are DESTDIR (by default XBPS_DESTDIR/pkgname-version),
SRCPKGDESTDIR (XBPS_DESTDIR/sourcepkg-version) and FILESDIR
(XBPS_TEMPLATESDIR/pkgname/files).

This simplifies packages that used them.

--HG--
extra : convert_revision : 287ea7128cb5df19870ca7aff0a3b8f99a11d63a
This commit is contained in:
Juan RP 2009-03-11 06:31:56 +01:00
parent 529cb677ff
commit 84222395b8
90 changed files with 535 additions and 735 deletions

View file

@ -91,6 +91,7 @@ install_src_phase()
fi
. $XBPS_TEMPLATESDIR/$pkgname/$subpkg.template
pkgname=${sourcepkg}-${subpkg}
set_tmpl_common_vars
run_func do_install
run_template ${sourcepkg}
[ "$pkg" = "${sourcepkg}-${subpkg}" ] && break
@ -113,11 +114,9 @@ install_src_phase()
make_install()
{
local destdir=$XBPS_DESTDIR/$pkgname-$version
if [ -z "$make_install_target" ]; then
make_install_target="install prefix=$destdir/usr"
make_install_target="$make_install_target sysconfdir=$destdir/etc"
make_install_target="install prefix=${DESTDIR}/usr"
make_install_target="$make_install_target sysconfdir=${DESTDIR}/etc"
fi
[ -z "$make_cmd" ] && make_cmd=/usr/bin/make