diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-11-20 15:27:06 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-11-20 20:20:51 +0000 |
commit | d01c0269b8e5e467f82cd28392579c4c43fe63bc (patch) | |
tree | 2e105ff06c5bb57331c42ba9aa4338fe94316dc1 /subr/pkg_fetch.subr | |
parent | 49b46005e7f7ebebcf6b43d451918c5462ac28d4 (diff) | |
download | midipix_build-d01c0269b8e5e467f82cd28392579c4c43fe63bc.tar.bz2 midipix_build-d01c0269b8e5e467f82cd28392579c4c43fe63bc.tar.xz |
subr/pkg_{autoconf,configure,patch}.subr: reference ${PKG_BASE_DIR} instead of ${WORKDIR}.
subr/pkg_build_dir.subr: {build,install} packages nested within ${PKG_BUILD_DIR}/.
subr/pkg_distclean.subr: removed from repository.
subr/pkg_{extract,fetch}.subr: {extract,fetch} within ${PKG_BASE_DIR}.
subr/pkg_install.subr: install to ../destdir to facilitate post-installation processing.
subr/pkg_setup_env.subr: set & create ${PKG_BASE_DIR}.
subr/pre_subdirs.subr: always create ${PREFIX}/bin.
vars/build.vars: consistently use ${PKG_{PREFIX,MAKE_INSTALL_VNAME,MAKEFLAGS_INSTALL}}.
vars/env.vars, *: cleanup.
Diffstat (limited to 'subr/pkg_fetch.subr')
-rw-r--r-- | subr/pkg_fetch.subr | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/subr/pkg_fetch.subr b/subr/pkg_fetch.subr index 37c2439e..7c71c344 100644 --- a/subr/pkg_fetch.subr +++ b/subr/pkg_fetch.subr @@ -14,7 +14,7 @@ pkgp_fetch() { || [ -e "${_url_dst}.fetched" ]; then return 0; else - wget ${WGET_ARGS} -c -O "${_url_dst}" "${_url}"; + wget ${DEFAULT_WGET_ARGS} -c -O "${_url_dst}" "${_url}"; fi; if [ -n "${_sha256sum_src}" ]; then set -- $(openssl dgst -sha256 "${_url_dst}"); shift $((${#}-1)); @@ -30,7 +30,7 @@ pkgp_fetch() { }; pkgp_fetch_git() { - local _subdir="${1}" _url="${2}" _branch="${3}"; + local _tgtdir="${1}" _subdir="${2}" _url="${3}" _branch="${4}"; if [ "${ARG_OFFLINE:-0}" -eq 0 ]; then if [ -e "${DLCACHEDIR}/${_subdir}" ]; then (build_fileop cd "${DLCACHEDIR}/${_subdir}" &&\ @@ -45,27 +45,27 @@ pkgp_fetch_git() { fi; fi; fi; - build_fileop rm "${WORKDIR}/${_subdir}"; - build_fileop cp "${DLCACHEDIR}/${_subdir}" "${WORKDIR}"; + build_fileop rm "${_tgtdir}/${_subdir}"; + build_fileop cp "${DLCACHEDIR}/${_subdir}" "${_tgtdir}"; }; pkgp_fetch_urls_git() { - local _url_spec _subdir _url _git_branch; - for _url_spec in ${@}; do + local _tgtdir="${2}" _url_spec _subdir _url _git_branch; + for _url_spec in ${1}; do _subdir="${_url_spec%=*}"; _url="${_url_spec#*=}"; _url="${_url%@*}"; if [ "${_url_spec#*@}" != "${_url_spec}" ]; then _git_branch=${_url_spec#*@}; fi; - pkgp_fetch_git ${_subdir} ${_url} ${_git_branch}; + pkgp_fetch_git "${_tgtdir}" "${_subdir}" "${_url}" "${_git_branch}"; done; }; pkg_fetch() { if [ -n "${1}" ]; then if [ "${1}" = "-git" ]; then - shift; pkgp_fetch_urls_git "${1}"; + shift; pkgp_fetch_urls_git "${1}" "${PKG_BASE_DIR}"; else pkgp_fetch "${1}" "${2}"; fi; @@ -74,7 +74,7 @@ pkg_fetch() { pkgp_fetch "${PKG_URL}" "${PKG_SHA256SUM}" "${PKG_FNAME}"; fi; if [ -n "${PKG_URLS_GIT}" ]; then - pkgp_fetch_urls_git "${PKG_URLS_GIT}"; + pkgp_fetch_urls_git "${PKG_URLS_GIT}" "${PKG_BASE_DIR}"; fi; fi; }; |