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:
parent
06d451e557
commit
8918861000
@ -71,7 +71,16 @@ fetch_distfiles()
|
|||||||
#
|
#
|
||||||
[ "$build_style" = "meta-template" ] && return 0
|
[ "$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
|
for f in ${distfiles}; do
|
||||||
curfile=$(basename $f)
|
curfile=$(basename $f)
|
||||||
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
if [ -f "$XBPS_SRCDISTDIR/$curfile" ]; then
|
||||||
|
@ -63,7 +63,7 @@ reset_tmpl_vars()
|
|||||||
make_build_args make_install_args build_style \
|
make_build_args make_install_args build_style \
|
||||||
short_desc maintainer long_desc checksum wrksrc \
|
short_desc maintainer long_desc checksum wrksrc \
|
||||||
patch_files make_cmd base_chroot register_shell \
|
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 \
|
pre_configure pre_build pre_install configure_shell \
|
||||||
post_configure post_build post_install \
|
post_configure post_build post_install \
|
||||||
make_install_target version revision essential \
|
make_install_target version revision essential \
|
||||||
@ -194,7 +194,8 @@ prepare_tmpl()
|
|||||||
|
|
||||||
if [ -z "$in_chroot" ]; then
|
if [ -z "$in_chroot" ]; then
|
||||||
export PATH="$XBPS_MASTERDIR/bin:$XBPS_MASTERDIR/sbin"
|
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:/bin:/sbin:/usr/bin:/usr/sbin"
|
||||||
export PATH="$PATH:/usr/local/sbin"
|
export PATH="$PATH:/usr/local/sbin"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user