Can't figure out github syntax

Paul Schmehl pschmehl_lists at tx.rr.com
Fri Feb 28 22:02:03 UTC 2014


--On February 28, 2014 at 11:21:24 PM +0200 Kozlov Sergey 
<kozlov.sergey.404 at gmail.com> wrote:

> On 28.02.2014 20:43, Paul Schmehl wrote:
>> I'm working on a new port that's fetched from github.
>>
>> This works:
>>
>> MASTER_SITES=
>> https://github.com/collectiveintel/cif-v1/releases/download/v1.0.2-FINAL/
>> DISTNAME=       libcif-v1.0.2-FINAL
>>
>> But I cannot for the life of me figure out how to convert that to the
>> more normal USE_GITHUB syntax.
>>
>> Is there a doc on the GITHUB syntax that explains it for dummies?
>>
> Hi!
>
> Check out the (/usr/ports)/Mk/bsd.sites.mk file, It's pretty well
> documented.

i wish that were true.  It might be for developers, but it's not for me.

>
> I think the right combination of GH_ACCOUNT, GH_PROJECT, GH_TAGNAME and
> GH_COMMIT would do the trick.
>

I would think so too, however...

Here's my Makefile:

# cat Makefile
# $FreeBSD$

PORTNAME=       cif
PORTVERSION=    1.0.2
MASTER_SITES=	GH GHC
CATEGORIES=     www perl5

MAINTAINER=     pauls at utdallas.edu
COMMENT=        Collective intelligence framework tool

LICENSE=        LGPL3

BUILD_DEPENDS=	p5-Net-SSLeay>=1.43:${PORTSDIR}/security/p5-Net-SSLeay \
		p5-Config-Simple>=4.59:${PORTSDIR}/devel/p5-Config-Simple \
 
	p5-DateTime-Format-DateParse>=0.05:${PORTSDIR}/devel/p5-DateTime-Format-DateParse 
\
 
	p5-Google-ProtocolBuffers>=0.08:${PORTSDIR}/devel/p5-Google-ProtocolBuffers 
\
		p5-Regexp-Common>=2.122:${PORTSDIR}/textproc/p5-Regexp-Common \
		p5-URI>=1.56:${PORTSDIR}/net/p5-URI \
		p5-LWP-Protocol-https>=6.02:${PORTSDIR}/www/p5-LWP-Protocol-https \
		p5-Digest-SHA1>=2.10:${PORTSDIR}/security/p5-Digest-SHA1 \
		p5-Net-Patricia>=1.16:${PORTSDIR}/net/p5-Net-Patricia \
		p5-Module-Pluggable>=3.8:${PORTSDIR}/devel/p5-Module-Pluggable \
		p5-Try-Tiny>=0.04:${PORTSDIR}/lang/p5-Try-Tiny \
		p5-MIME-Base64>=3.06:${PORTSDIR}/converters/p5-MIME-Base64 \
		p5-Iodef-Pb-Simple>=0.21:${PORTSDIR}/devel/p5-Iodef-Pb-Simple \
 
	p5-Regexp-Common-net-CIDR>=0.02:${PORTSDIR}/textproc/p5-Regexp-Common-net-CIDR 
\
		p5-Compress-Snappy>=0.18:${PORTSDIR}/archivers/p5-Compress-Snappy \
		p5-Log-Dispatch>=2.32:${PORTSDIR}/devel/p5-Log-Dispatch \
		p5-JSON-XS>=3.0.0:${PORTSDIR}/converters/p5-JSON-XS

USE_GITHUB=	yes
GH_ACCOUNT=	collectiveintel
GH_PROJECT=	cif-v1
GH_TAGNAME=	libcif-v${PORTVERSION}-FINAL
GH_COMMIT=	d86ca6c

#https://github.com/collectiveintel/cif-v1/releases/download/v1.0.2-FINAL/libcif-v1.0.2-FINAL.tar.gz

HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	--prefix=${STAGEDIR}/${PREFIX}

.include <bsd.port.mk>

The commented out url is what I want to pull down.  The TAGNAME does not do 
that.  If I call the url MASTER_SITES it works fine, but that's obviously 
not the right way to do it.

I don't understand how to get these macros to do what I need.

Attempting to fetch 
https://codeload.github.com/collectiveintel/cif-v1/legacy.tar.gz/libcif-v1.0.2-FINAL?dummy=/cif-1.0.2.tar.gz
fetch: 
https://codeload.github.com/collectiveintel/cif-v1/legacy.tar.gz/libcif-v1.0.2-FINAL?dummy=/cif-1.0.2.tar.gz: 
Not Found
=> Attempting to fetch 
http://codeload.github.com/collectiveintel/cif-v1/legacy.tar.gz/libcif-v1.0.2-FINAL?dummy=/cif-1.0.2.tar.gz

Obviously it's not descending into the releases/download folder to find the 
tarball.  The question is, why isn't it, and how do I get it to do that?

-- 
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell



More information about the freebsd-ports mailing list