diff options
author | mat <mat@FreeBSD.org> | 2017-08-16 20:50:10 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 05:22:10 +0800 |
commit | 7037d96c23fae481e3de62e9db8846d0d91238d9 (patch) | |
tree | 491fd4643b05ec91085005350f144bc8de9525b5 /Mk | |
parent | 72d47cc1e205ffdb8dc045f3840b4245d68e052b (diff) | |
download | freebsd-ports-gnome-7037d96c23fae481e3de62e9db8846d0d91238d9.tar.gz freebsd-ports-gnome-7037d96c23fae481e3de62e9db8846d0d91238d9.tar.zst freebsd-ports-gnome-7037d96c23fae481e3de62e9db8846d0d91238d9.zip |
Add a git-clone target to clone the github repositories referenced in
ports using USE_GITHUB.
Sponsored by: Absolight
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.sites.mk | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk index c8599aae77ab..652b72d3c751 100644 --- a/Mk/bsd.sites.mk +++ b/Mk/bsd.sites.mk @@ -531,8 +531,14 @@ DISTNAME:= ${DISTNAME}_GH${_GITHUB_REV} . endif _GITHUB_EXTRACT_SUFX= .tar.gz # Put the DEFAULT distfile first +_GITHUB_CLONE_DIR?= ${WRKDIR}/git-clone +_PORTS_DIRECTORIES+= ${_GITHUB_CLONE_DIR} . if !${USE_GITHUB:Mnodefault} && defined(_GITHUB_MUST_SET_DISTNAME) DISTFILES+= ${DISTNAME}${_GITHUB_EXTRACT_SUFX} +git-clone: git-clone-DEFAULT +git-clone-DEFAULT: ${_GITHUB_CLONE_DIR} + @git clone https://github.com/${GH_ACCOUNT_DEFAULT}/${GH_PROJECT_DEFAULT}.git ${_GITHUB_CLONE_DIR}/${GH_PROJECT_DEFAULT} + @${ECHO_MSG} "Cloned the default github repository into ${_GITHUB_CLONE_DIR}/${GH_PROJECT_DEFAULT}" | ${FMT_80} . endif . if !empty(GH_SUBDIR) _SITES_extract:= 690:post-extract-gh-DEFAULT @@ -566,6 +572,10 @@ post-extract-gh-${_group}: @${MV} ${WRKSRC_${_group}} ${WRKSRC}/${GH_SUBDIR_${_group}} @ln -s ${WRKSRC:T}/${GH_SUBDIR_${_group}} ${WRKSRC_${_group}} . endif +git-clone: git-clone-${_group} +git-clone-${_group}: ${_GITHUB_CLONE_DIR} + @git clone https://github.com/${GH_ACCOUNT_${_group}}/${GH_PROJECT_${_group}}.git ${_GITHUB_CLONE_DIR}/${GH_PROJECT_${_group}} + @${ECHO_MSG} "Cloned the ${_group} github repository into ${_GITHUB_CLONE_DIR}/${GH_PROJECT_${_group}}" | ${FMT_80} . endfor . endif convert-to-gh-tuple: |