aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2012-08-20 18:04:13 +0800
committergahr <gahr@FreeBSD.org>2012-08-20 18:04:13 +0800
commitf6ab43415bc2d6ab0ba26e8d28b357352a487571 (patch)
treecac6f48477470396266c563c1f8b70c7a329f87a /Mk
parent5d8dc91e457d2518fc902ecede2100a98a7d1262 (diff)
downloadfreebsd-ports-graphics-f6ab43415bc2d6ab0ba26e8d28b357352a487571.tar.gz
freebsd-ports-graphics-f6ab43415bc2d6ab0ba26e8d28b357352a487571.tar.zst
freebsd-ports-graphics-f6ab43415bc2d6ab0ba26e8d28b357352a487571.zip
- Add support for fetching from GitHub in bsd.sites.mk
- Document the mechanism in CHANGES - Add www/tivoka (a JSON-RPC client/server library in PHP) which uses the GitHub mechanism Approved by: beat (portmgr) after exp-run
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.sites.mk29
1 files changed, 29 insertions, 0 deletions
diff --git a/Mk/bsd.sites.mk b/Mk/bsd.sites.mk
index 965f34e8b7d..73bef158159 100644
--- a/Mk/bsd.sites.mk
+++ b/Mk/bsd.sites.mk
@@ -515,6 +515,33 @@ MASTER_SITE_GET_E+= \
http://www5.get-e.org/%SUBDIR%/_files/
.endif
+.if !defined(IGNORE_MASTER_SITE_GITHUB)
+#
+# In order to use GitHub your port must define USE_GITHUB and the following
+# variables:
+#
+# GH_ACCOUNT - account name of the GitHub user hosting the project
+# default: not set, mandatory
+#
+# GH_PROJECT - name of the project on GitHub
+# default: ${PORTNAME}
+#
+# GH_TAGNAME - name of the tag to download (master, 2.0.1, ...)
+# default: ${DISTVERSION}
+#
+# GH_COMMIT - first 7 digits of the commit that generated GH_TAGNAME
+# (man git-describe(1))
+# default: not set, mandatory
+#
+.if defined(USE_GITHUB)
+MASTER_SITE_GITHUB+= https://nodeload.github.com/%SUBDIR%
+MASTER_SITES+= GH
+GH_PROJECT?= ${PORTNAME}
+GH_TAGNAME?= ${DISTVERSION}
+WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${GH_PROJECT}-${GH_COMMIT}
+.endif
+.endif
+
.if !defined(IGNORE_MASTER_SITE_GNOME)
MASTER_SITE_GNOME+= \
ftp://ftp.belnet.be/mirror/ftp.gnome.org/%SUBDIR%/ \
@@ -1461,6 +1488,7 @@ MASTER_SITE_KERNEL_ORG+= \
# Macro magic
MASTER_SITES_ABBREVS= CPAN:PERL_CPAN \
+ GH:GITHUB \
NL:NETLIB \
SF:SOURCEFORGE \
SFJP:SOURCEFORGE_JP \
@@ -1474,6 +1502,7 @@ MASTER_SITES_SUBDIRS= \
CSME:myports \
DEBIAN:pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME} \
GCC:releases/${DISTNAME} \
+ GITHUB:${GH_ACCOUNT}/${GH_PROJECT}/tarball/${GH_TAGNAME}?dummy=/ \
GNOME:sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/} \
GNU:${PORTNAME} \
HORDE:${PORTNAME} \