xbps-src: in setup_subpkg_tmpl() set SUBPKG for subpkgs.

This commit is contained in:
Juan RP 2011-07-14 14:59:37 +02:00
parent bcf07d9adc
commit a78e885a29

View file

@ -105,7 +105,7 @@ reset_tmpl_vars()
ignore_vdeps_dir noverifyrdeps conflicts dkms_modules \
gconf_entries gconf_schemas stow_copy stow_copy_files \
pre_remove post_remove post_stow do_build do_install \
homepage license kernel_hooks_version \
homepage license kernel_hooks_version SUBPKG \
XBPS_EXTRACT_DONE XBPS_CONFIGURE_DONE \
XBPS_BUILD_DONE XBPS_INSTALL_DONE FILESDIR DESTDIR \
SRCPKGDESTDIR PATCHESDIR CFLAGS CXXFLAGS CPPFLAGS \
@ -142,6 +142,8 @@ setup_tmpl()
setup_subpkg_tmpl()
{
local f
[ -z "$1" ] && return 1
if [ -r "$XBPS_SRCPKGDIR/$1/$1.template" ]; then
@ -149,11 +151,11 @@ setup_subpkg_tmpl()
unset run_depends build_depends
. $XBPS_SRCPKGDIR/$1/$1.template
for f in ${subpackages}; do
if [ "$subpkg" = "$1" ]; then
pkgname=$subpkg
set_tmpl_common_vars
break
fi
[ "$f" != "$1" ] && continue
pkgname=$f
set_tmpl_common_vars
SUBPKG=1
break
done
else
setup_tmpl $1