aboutsummaryrefslogtreecommitdiffstats
path: root/Mk/bsd.sites.mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2017-08-16 20:50:10 +0800
committermat <mat@FreeBSD.org>2017-08-16 20:50:10 +0800
commitdd1aee4f7958568091a6733044a0d3b3b4f28907 (patch)
tree683642493f1c3a3beb9c72a57d12b68ab0becf86 /Mk/bsd.sites.mk
parent0959a276598dbaad3bee776bbb2938a92d40a9c5 (diff)
downloadfreebsd-ports-gnome-dd1aee4f7958568091a6733044a0d3b3b4f28907.tar.gz
freebsd-ports-gnome-dd1aee4f7958568091a6733044a0d3b3b4f28907.tar.zst
freebsd-ports-gnome-dd1aee4f7958568091a6733044a0d3b3b4f28907.zip
Add a git-clone target to clone the github repositories referenced in
ports using USE_GITHUB. Sponsored by: Absolight
Diffstat (limited to 'Mk/bsd.sites.mk')
-rw-r--r--Mk/bsd.sites.mk10
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: