aboutsummaryrefslogtreecommitdiff
path: root/textproc/multimarkdown
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2013-11-14 23:31:09 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2013-11-14 23:31:09 +0000
commitb6737862c1c146cab2f83001bfb44ab69f862157 (patch)
tree5806f86bb25e3f7d543e2fd5ad041c9833970622 /textproc/multimarkdown
parent732065a0a435c6b3544ca4d6f1c9c4c6db78fefb (diff)
Notes
Diffstat (limited to 'textproc/multimarkdown')
-rw-r--r--textproc/multimarkdown/bsd.git-clone.mk49
1 files changed, 49 insertions, 0 deletions
diff --git a/textproc/multimarkdown/bsd.git-clone.mk b/textproc/multimarkdown/bsd.git-clone.mk
new file mode 100644
index 000000000000..ed33edae00a4
--- /dev/null
+++ b/textproc/multimarkdown/bsd.git-clone.mk
@@ -0,0 +1,49 @@
+# Created by: Adam Weinberger <adamw@FreeBSD.org>
+# $FreeBSD$
+
+# if a github project, use:
+#
+#GITHUB_CREATOR= someuser
+
+# otherwise, use:
+#
+#GIT_URL= https://example.com/path/to/${GIT_PROJECT_NAME}.git
+
+#GIT_PROJECT_NAME defaults to ${PORTNAME}
+
+# if there are submodules to checkout, define:
+#GIT_SUBMODULES= yes
+
+
+GIT_PROJECT_NAME?= ${PORTNAME}
+GIT_VERSION?= ${PORTVERSION}
+WRKSRC?= ${WRKDIR}/${GIT_PROJECT_NAME}
+
+.if defined(GITHUB_CREATOR)
+GIT_URL= https://github.com/${GITHUB_CREATOR}/${GIT_PROJECT_NAME}.git
+.endif
+
+.if !defined(GITHUB_CREATOR) && !defined(GIT_URL)
+.error You must define GITHUB_CREATOR or GIT_URL to use bsd.git-clone.mk
+.endif
+
+FETCH_DEPENDS+= git:${PORTSDIR}/devel/git
+
+# will not clobber do-{fetch,extract}
+do-fetch: git-fetch
+do-extract: git-extract
+
+git-fetch:
+ @if [ ! -e ${WRKSRC}/.git/index ]; then \
+ ${MKDIR} ${WRKDIR}; \
+ cd ${WRKDIR} && git clone ${GIT_URL}; \
+ cd ${WRKSRC} && git checkout ${GIT_VERSION}; \
+ if [ -n "${GIT_SUBMODULES}" ]; then \
+ cd ${WRKSRC} && git submodule init; \
+ cd ${WRKSRC} && git submodule update; \
+ fi \
+ fi
+
+git-extract:
+#normally do-extract starts with an rm -rf ${WRKSRC}
+ @${DO_NADA}