shutils: added "nofetch" variable to be used in build templates.

When it's set, a custom do_fetch() function must be used to fetch
sources. $distfiles and $checksum will be ignored in that case.
This makes it able to fetch sources from git, svn, bzr, etc.

--HG--
extra : convert_revision : xtraeme%40gmail.com-20091012102321-zqp4r783uo1s4sek
This commit is contained in:
Juan RP 2009-10-12 12:23:21 +02:00
parent 06d451e557
commit 8918861000
2 changed files with 13 additions and 3 deletions

View File

@ -71,7 +71,16 @@ fetch_distfiles()
#
[ "$build_style" = "meta-template" ] && return 0
cd $XBPS_SRCDISTDIR
#
# If nofetch is set in a build template, skip this phase
# entirely and run the do_fetch() function.
#
if [ -n "$nofetch" ]; then
cd ${XBPS_BUILDDIR} && run_func do_fetch
return $?
fi
cd $XBPS_SRCDISTDIR || return 1
for f in ${distfiles}; do
curfile=$(basename $f)
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then

View File

@ -63,7 +63,7 @@ reset_tmpl_vars()
make_build_args make_install_args build_style \
short_desc maintainer long_desc checksum wrksrc \
patch_files make_cmd base_chroot register_shell \
make_build_target configure_script noextract \
make_build_target configure_script noextract nofetch \
pre_configure pre_build pre_install configure_shell \
post_configure post_build post_install \
make_install_target version revision essential \
@ -194,7 +194,8 @@ prepare_tmpl()
if [ -z "$in_chroot" ]; then
export PATH="$XBPS_MASTERDIR/bin:$XBPS_MASTERDIR/sbin"
export PATH="$PATH:$XBPS_MASTERDIR/usr/bin:$XBPS_MASTERDIR/usr/sbin"
export PATH="$PATH:$XBPS_MASTERDIR/usr/bin"
export PATH="$PATH:$XBPS_MASTERDIR/usr/sbin"
export PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin"
export PATH="$PATH:/usr/local/sbin"
fi