diff --git a/xbps-src/shutils/pkgtarget_funcs.sh.in b/xbps-src/shutils/pkgtarget_funcs.sh.in index cc8b12bf53c..efe0ec4e652 100644 --- a/xbps-src/shutils/pkgtarget_funcs.sh.in +++ b/xbps-src/shutils/pkgtarget_funcs.sh.in @@ -117,10 +117,16 @@ install_pkg() if [ ! -f "$XBPS_CONFIGURE_DONE" ]; then configure_src_phase || return $? + if [ "$INSTALL_TARGET" = "configure" ]; then + return 0 + fi fi if [ ! -f "$XBPS_BUILD_DONE" ]; then build_src_phase || return $? + if [ "$INSTALL_TARGET" = "build" ]; then + return 0 + fi fi # Install pkg into destdir. diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 1ed41f8693e..42e25fd843d 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -23,7 +23,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #- -readonly XBPS_SRC_BUILD_VERSION=20111117-2 +readonly XBPS_SRC_BUILD_VERSION=20111118 XBPS_CONFIG_FILE=@@XBPS_INSTALL_ETCDIR@@/xbps-src.conf PROGNAME=$(basename $0) @@ -368,40 +368,6 @@ bootstrap-update) ${FAKEROOT_CMD} ${FAKEROOT_CMD_ARGS} ${XBPS_BIN_CMD} -y autoupdate fi ;; -build|configure) - if [ -z "${_pkgname}" ]; then - [ ! -r ./template ] && msg_error "missing build template in $(pwd).\n" - . ./template - _pkgname=$(basename_cwd) - fi - - if [ -z "$bootstrap" -a -z "$IN_CHROOT" ]; then - xbps_chroot_handler $target ${_pkgname} - else - _ORIGINPKG="${_pkgname}" - setup_tmpl ${_ORIGINPKG} - # If pkg has dependencies, install them first. - install_dependencies_pkg "$pkgname-$version" - if [ $? -ne 0 ]; then - msg_red "cannot install required deps for $pkgname.\n" - exit 1 - fi - # All deps were installed, continue with the origin pkg... - setup_tmpl ${_ORIGINPKG} - fetch_distfiles || exit $? - if [ ! -f "$XBPS_EXTRACT_DONE" ]; then - extract_distfiles || exit $? - fi - if [ "$target" = "configure" ]; then - configure_src_phase || exit $? - else - if [ ! -f "$XBPS_CONFIGURE_DONE" ]; then - configure_src_phase || exit $? - fi - build_src_phase || exit $? - fi - fi - ;; build-pkg) if [ -n "${_PACKAGEDIR}" ]; then export XBPS_PACKAGESDIR=${_PACKAGEDIR} @@ -458,7 +424,7 @@ extract|fetch) fetch_distfiles $update_checksum [ "$target" = "extract" ] && extract_distfiles ;; -install) +build|configure|install) if [ -z "${_pkgname}" ]; then [ ! -r ./template ] && msg_error "missing build template in $(pwd).\n" _pkgname=$(basename_cwd) @@ -468,7 +434,7 @@ install) if [ -z "$IN_CHROOT" -a -z "$bootstrap" ]; then xbps_chroot_handler $target ${_ORIGINPKG} || exit $? else - install_pkg $pkgname || exit $? + INSTALL_TARGET=$target install_pkg $pkgname || exit $? fi ;; list)