summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmarks/glmark2/Makefile6
-rw-r--r--emulators/libretro-pcsx-rearmed/Makefile9
-rw-r--r--mk/bsd.pkg.mk10
-rw-r--r--mk/fetch/bsd.fetch-vars.mk7
-rw-r--r--mk/fetch/github.mk85
-rw-r--r--net/inadyn/Makefile5
6 files changed, 58 insertions, 64 deletions
diff --git a/benchmarks/glmark2/Makefile b/benchmarks/glmark2/Makefile
index eeef155ef84..416044fc5a6 100644
--- a/benchmarks/glmark2/Makefile
+++ b/benchmarks/glmark2/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2015/03/07 17:15:11 tnn Exp $
+# $NetBSD: Makefile,v 1.4 2015/03/07 21:14:32 tnn Exp $
DISTNAME= glmark2-2014.03
CATEGORIES= benchmarks
-USE_GITHUB= yes
-GH_COMMIT= 499aa81a68fb4c8aac1c80f0d6a4cce05941c4cc
+MASTER_SITES= ${MASTER_SITE_GITHUB:=glmark2/}
+GITHUB_TAG= 499aa81a68fb4c8aac1c80f0d6a4cce05941c4cc
MAINTAINER= prlw1@cam.ac.uk
HOMEPAGE= https://github.com/glmark2/glmark2
diff --git a/emulators/libretro-pcsx-rearmed/Makefile b/emulators/libretro-pcsx-rearmed/Makefile
index 1b75db8ab74..190f012478a 100644
--- a/emulators/libretro-pcsx-rearmed/Makefile
+++ b/emulators/libretro-pcsx-rearmed/Makefile
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2015/03/07 14:29:35 tnn Exp $
+# $NetBSD: Makefile,v 1.6 2015/03/07 21:14:32 tnn Exp $
DISTNAME= libretro-pcsx-rearmed-0.22
CATEGORIES= emulators
-USE_GITHUB= yes
-GH_ACCOUNT= notaz
-GH_PROJECT= pcsx_rearmed
-GH_TAGNAME= r22
+MASTER_SITES= ${MASTER_SITE_GITHUB:=notaz/}
+GITHUB_PROJECT= pcsx_rearmed
+GITHUB_TAG= r22
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://notaz.gp2x.de/pcsx_rearmed.php
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 5f38185fa51..00a0a6cf88e 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.2010 2015/03/07 14:17:51 tnn Exp $
+# $NetBSD: bsd.pkg.mk,v 1.2011 2015/03/07 21:14:32 tnn Exp $
#
# This file is in the public domain.
#
@@ -96,12 +96,8 @@ MAINTAINER?= pkgsrc-users@NetBSD.org
.endif
PKGWILDCARD?= ${PKGBASE}-[0-9]*
TOOL_DEPENDS?= # empty
-.if defined(USE_GITHUB) && !empty(USE_GITHUB:M[yY][eE][sS]) && \
- defined(GH_COMMIT) && !empty(GH_COMMIT)
-WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_COMMIT}
-.elif defined(USE_GITHUB) && !empty(USE_GITHUB:M[yY][eE][sS]) && \
- defined(GH_TAGNAME) && !empty(GH_TAGNAME)
-WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME:C/^v//}
+.if defined(GITHUB_TAG)
+WRKSRC?= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG:C/^v//}
.else
WRKSRC?= ${WRKDIR}/${DISTNAME:U${PKGNAME_NOREV}}
.endif
diff --git a/mk/fetch/bsd.fetch-vars.mk b/mk/fetch/bsd.fetch-vars.mk
index 0f13be2afaa..0eadd0b1776 100644
--- a/mk/fetch/bsd.fetch-vars.mk
+++ b/mk/fetch/bsd.fetch-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.fetch-vars.mk,v 1.17 2015/03/07 14:17:52 tnn Exp $
+# $NetBSD: bsd.fetch-vars.mk,v 1.18 2015/03/07 21:14:32 tnn Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -37,8 +37,9 @@ _SYS_VARS.fetch= DEFAULT_DISTFILES
_DISTDIR= ${DISTDIR}/${DIST_SUBDIR}
.if defined(DISTNAME) && !empty(DISTNAME)
-. if defined(GH_COMMIT) && !empty(GH_COMMIT)
-DEFAULT_DISTFILES= ${DISTNAME}-${GH_COMMIT}${EXTRACT_SUFX}
+. if defined(GITHUB_TAG) && !empty(GITHUB_TAG:M[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]*)
+# if the github tag is a git hash (7 or more hex digits), encode it in the distfile name
+DEFAULT_DISTFILES= ${DISTNAME}-${GITHUB_TAG}${EXTRACT_SUFX}
. else
DEFAULT_DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
. endif
diff --git a/mk/fetch/github.mk b/mk/fetch/github.mk
index 83f7ce71fb3..7a66c39e0d4 100644
--- a/mk/fetch/github.mk
+++ b/mk/fetch/github.mk
@@ -1,69 +1,68 @@
-# $NetBSD: github.mk,v 1.4 2015/03/07 16:54:28 tnn Exp $
+# $NetBSD: github.mk,v 1.5 2015/03/07 21:14:32 tnn Exp $
#
# github.com master site handling
#
# To use, set in Makefile:
#
# DISTNAME= exampleproject-1.2
-# USE_GITHUB= YES
+# MASTER_SITES= ${MASTER_SITE_GITHUB:=accountname/}
#
-# The following variables alter USE_GITHUB behavior:
+# The following variables alter github.mk behavior:
#
-# GH_ACCOUNT defaults to PKGBASE
-# GH_PROJECT defaults to PKGBASE
-# GH_TAGNAME defaults to PKGVERSION_NOREV
-# (sometimes you want to override with v${PKGVERSION_NOREV})
-# GH_COMMIT explicit commit hash if no tag is available
-# GH_RELEASE default empty, may be set to ${DISTNAME} for example
-# GH_TYPE overrides the autodetected MASTER_SITE URL scheme:
+# GITHUB_PROJECT defaults to PKGBASE
+# GITHUB_TAG defaults to PKGVERSION_NOREV
+# sometimes you want to override with v${PKGVERSION_NOREV}
+# SHA-1 commit ids are also acceptable
+# GITHUB_RELEASE defaults to not defined, set this to ${DISTNAME}
+# when packaging a release not based on a git tag.
+# GITHUB_TYPE overrides the autodetected MASTER_SITE URL scheme:
#
# "tag"
-# This is the default when GH_TAGNAME is set or no type was specified. Exampe URL:
-# http://github.com/acct/proj/archive/{GH_TAGNAME}.tar.gz
+# This is the default when GITHUB_RELEASE is not defined. Example URL:
+# http://github.com/acct/${GITHUB_PROJECT}/archive/{GITHUB_TAG}.tar.gz
#
# "release"
-# This is the default when GH_RELEASE is set. Example URL:
-# http://github.com/acct/proj/releases/download/${GH_RELEASE}/${DISTNAME}.tar.gz
-#
-# "commit"
-# This is the default when GH_COMMIT is set. Example URL:
-# http://github.com/acct/proj/archive/${GH_COMMIT}.tar.gz
+# This is the default when GITHUB_RELEASE is set. Example URL:
+# http://github.com/acct/${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/${DISTNAME}.tar.gz
#
# Keywords: github
-.if defined(USE_GITHUB) && !empty(USE_GITHUB:M[yY][eE][sS])
+# xxx move this to sites.mk
+MASTER_SITE_GITHUB?= https://github.com/
+
+.if defined(MASTER_SITES) && !empty(MASTER_SITES:C,^https\://github.com/[a-zA-Z0-9]*/$,match,:Mmatch)
+_USE_GITHUB= YES
+.endif
+
+.if (defined(GITHUB_TAG) || defined(GITHUB_RELEASE)) && !defined(_USE_GITHUB)
+PKG_FAIL_REASON+= "MASTER_SITES must match https://github.com/account/" \
+ "when GITHUB_TAG or GITHUB_RELEASE is in use." \
+ "For more information: make help topic=github"
+.endif
-# maybe move this to sites.mk
-MASTER_SITE_GITHUB?= https://github.com/
+.if defined(_USE_GITHUB) && !empty(_USE_GITHUB:M[yY][eE][sS])
-GH_ACCOUNT?= ${PKGBASE}
-GH_PROJECT?= ${PKGBASE}
-GH_TAGNAME?= ${PKGVERSION_NOREV}
+GITHUB_PROJECT?= ${PKGBASE}
+GITHUB_TAG?= ${PKGVERSION_NOREV}
-. if !empty(GH_TAGNAME:Mmaster)
-PKG_FAIL_REASON+= "master is not a valid tag name, use an explicit commit hash (hint: set GH_COMMIT)"
+. if !empty(GITHUB_TAG:Mmaster)
+PKG_FAIL_REASON+= "master is not a valid tag name, use an explicit commit hash"
. endif
-. if !defined(GH_TYPE)
-. if defined(GH_COMMIT) && !empty(GH_COMMIT:M*)
-GH_TYPE= commit
-. elif defined(GH_RELEASE) && !empty(GH_RELEASE:M*)
-GH_TYPE= release
-. else
-GH_TYPE= tag
+. if !defined(GITHUB_TYPE)
+. if defined(GITHUB_RELEASE) && !empty(GITHUB_RELEASE)
+GITHUB_TYPE= release
+. else
+GITHUB_TYPE= tag
. endif
. endif
-.if !empty(GH_TYPE:Mrelease)
-MASTER_SITES?= ${MASTER_SITE_GITHUB}${GH_ACCOUNT}/${GH_PROJECT}/releases/download/${GH_RELEASE}/
-.endif
-
-.if !empty(GH_TYPE:Mcommit)
-MASTER_SITES?= -${MASTER_SITE_GITHUB}${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_COMMIT}${EXTRACT_SUFX}
-.endif
+. if !empty(GITHUB_TYPE:Mrelease)
+MASTER_SITES:= ${MASTER_SITES:=${GITHUB_PROJECT}/releases/download/${GITHUB_RELEASE}/}
+. endif
-.if !empty(GH_TYPE:Mtag)
-MASTER_SITES?= -${MASTER_SITE_GITHUB}${GH_ACCOUNT}/${GH_PROJECT}/archive/${GH_TAGNAME}${EXTRACT_SUFX}
-.endif
+. if !empty(GITHUB_TYPE:Mtag)
+MASTER_SITES:= -${MASTER_SITES:=${GITHUB_PROJECT}/archive/${GITHUB_TAG}${EXTRACT_SUFX}}
+. endif
.endif
diff --git a/net/inadyn/Makefile b/net/inadyn/Makefile
index 7c912bb619d..a6f2519dbfc 100644
--- a/net/inadyn/Makefile
+++ b/net/inadyn/Makefile
@@ -1,10 +1,9 @@
-# $NetBSD: Makefile,v 1.7 2015/03/07 14:33:08 tnn Exp $
+# $NetBSD: Makefile,v 1.8 2015/03/07 21:14:32 tnn Exp $
DISTNAME= inadyn-1.96.2
PKGREVISION= 1
CATEGORIES= net
-USE_GITHUB= yes
-GH_ACCOUNT= troglobit
+MASTER_SITES= ${MASTER_SITE_GITHUB:=troglobit/}
EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users@NetBSD.org