diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2016-07-11 19:07:00 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de> | 2016-07-11 19:39:54 +0000 |
commit | 49b310339d45f9e4a109d80254006c05069b1563 (patch) | |
tree | cef728e804154a180b4b3dbf13ae2f347560f364 | |
parent | 672107a200f15d952f2d8c3750e8c58be5035ee3 (diff) | |
download | midipix_build-49b310339d45f9e4a109d80254006c05069b1563.tar.bz2 midipix_build-49b310339d45f9e4a109d80254006c05069b1563.tar.xz |
Adds ${PKG_GIT_BRANCH}; correctly handle Git branches.
-rw-r--r-- | build.subr | 13 | ||||
-rw-r--r-- | build.vars | 5 | ||||
-rw-r--r-- | pkg.build | 2 |
3 files changed, 14 insertions, 6 deletions
@@ -34,11 +34,18 @@ fetch() { }; fetch_git() { - _fg_subdir="${1}"; _fg_url="${2}"; _fg_git_args_extra="${3}"; + _fg_subdir="${1}"; _fg_url="${2}"; _fg_branch="${3}"; if [ -e "${DLCACHEDIR}/${_fg_subdir}" ]; then - (cd ${DLCACHEDIR}/${_fg_subdir} && git pull origin main); + cd ${DLCACHEDIR}/${_fg_subdir} &&\ + git pull origin ${_fg_branch:-main} && cd ${OLDPWD}; else - git clone ${_fg_git_args_extra} ${_fg_url} ${DLCACHEDIR}/${_fg_subdir}; + git clone ${_fg_url} ${DLCACHEDIR}/${_fg_subdir}; + if [ -n "${_fg_branch}" -a \ + \( -z "${_fg_branch#main}" \) -a \ + \( -z "${_fg_branch#master}" \) ]; then + cd ${DLCACHEDIR}/${_fg_subdir} &&\ + git checkout -b ${_fg_branch} && cd ${OLDPWD}; + fi; fi; rm_if_exists ${_fg_subdir}; echo cp -pr ${DLCACHEDIR}/${_fg_subdir} .; @@ -64,7 +64,7 @@ export PATH="${PREFIX}/bin${PATH:+:${PATH}}"; # pkg.build # DEFAULT_MAKEFLAGS_BUILD=-j${BUILD_CPUS:=1}; -PKG_BUILD_VARS="BUILD_CMDLINE BUILD_DIR BUILD_TYPE CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIG_CACHE_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA FNAME GIT_ARGS_EXTRA INSTALL_FILES INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN NO_MAKE_INSTALL PREFIX_EXTRA SHA256SUM SLIBTOOL SUBDIR SUBDIR_CREATE URL URL_FNAME URL_TYPE VERSION"; +PKG_BUILD_VARS="BUILD_CMDLINE BUILD_DIR BUILD_TYPE CFLAGS_BUILD_EXTRA CFLAGS_CONFIGURE CFLAGS_CONFIGURE_EXTRA CFLAGS_INSTALL_EXTRA CONFIG_CACHE_EXTRA CONFIGURE_ARGS CONFIGURE_ARGS_EXTRA ENV_VARS_EXTRA FNAME GIT_BRANCH INSTALL_FILES INSTALL_TARGET LDFLAGS_BUILD_EXTRA LDFLAGS_CONFIGURE LDFLAGS_CONFIGURE_EXTRA LDFLAGS_INSTALL_EXTRA MAKEFLAGS_BUILD MAKEFLAGS_BUILD_EXTRA MAKEFLAGS_INSTALL MAKEFLAGS_INSTALL_EXTRA NO_CLEAN NO_MAKE_INSTALL PREFIX_EXTRA SHA256SUM SLIBTOOL SUBDIR SUBDIR_CREATE URL URL_FNAME URL_TYPE VERSION"; PKG_LVL0_PREFIX="${PREFIX_CROSS}"; PKG_LVL0_BUILD_TYPE="host"; PKG_LVL0_CFLAGS_CONFIGURE="${PKG_LVL0_CFLAGS_CONFIGURE_DEFAULT}"; @@ -346,7 +346,7 @@ PKG_LVL3_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; : ${PKG_CRON_URL_TYPE:=git}; : ${PKG_CRON_BUILD_DIR:=pkg-cron.git}; : ${PKG_CRON_ENV_VARS_EXTRA:="CC=${TARGET}-gcc:CFLAGS=${PKG_LVL3_CFLAGS_CONFIGURE} -D__GNU__"}; -: ${PKG_CRON_GIT_ARGS_EXTRA:="-b debian/3.0pl1-128"}; +: ${PKG_CRON_GIT_BRANCH:=debian/3.0pl1-128}; : ${PKG_CURL_VERSION:=7.47.1}; : ${PKG_CURL_SHA256SUM:=ddc643ab9382e24bbe4747d43df189a0a6ce38fcb33df041b9cb0b3cd47ae98f}; : ${PKG_CURL_URL:=https://curl.haxx.se/download/curl-${PKG_CURL_VERSION}.tar.bz2}; @@ -382,6 +382,7 @@ PKG_LVL3_MAKEFLAGS_INSTALL="DESTDIR=${PREFIX_NATIVE}"; : ${PKG_HEXCURSE_CFLAGS_CONFIGURE_EXTRA:=-I${PREFIX_NATIVE}/include/ncursesw}; : ${PKG_HEXCURSE_URL:=https://github.com/LonnyGomes/hexcurse}; : ${PKG_HEXCURSE_URL_TYPE:=git}; +: ${PKG_HEXCURSE_GIT_BRANCH:=master}; : ${PKG_HTOP_VERSION:=2.0.1}; : ${PKG_HTOP_SHA256SUM:=f410626dfaf6b70fdf73cd7bb33cae768869707028d847fed94a978e974f5666}; : ${PKG_HTOP_URL:=http://hisham.hm/htop/releases/${PKG_HTOP_VERSION}/htop-${PKG_HTOP_VERSION}.tar.gz}; @@ -25,7 +25,7 @@ if ! is_build_script_done fetch; then if [ "${PKG_URL_TYPE:-wget}" = wget ]; then fetch "${PKG_URL}" ${PKG_SHA256SUM}; else - fetch_git ${PKG_SUBDIR} ${PKG_URL} "${PKG_GIT_ARGS_EXTRA}"; + fetch_git ${PKG_SUBDIR} ${PKG_URL} ${PKG_GIT_BRANCH}; fi; fi; set_build_script_done fetch -extract; |