tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: heads up: please use USE_GITHUB=yes when packaging software hosted on GH



On Mon, 9 Mar 2015 10:43:15 +0000
Patrick Welche <prlw1%cam.ac.uk@localhost> wrote:

> On Sat, Mar 07, 2015 at 04:44:26PM +0100, Tobias Nygren wrote:
> > I added a helper mk fragment to contain the github distinfo mess,
> > inspired by FreeBSD. Please refer to these instructions:
> > 
> > https://www.netbsd.org/docs/pkgsrc/fixes.html#build.fetch.github
> > 
> > When converting packages to USE_GITHUB, please remember to
> > remove MASTER_SITES, PKGNAME, DIST_SUBDIR and WRKSRC overrides
> > as those are no longer required in the typical case.
> 
> I think I don't understand what DISTNAME means in this case, so e.g.,
> the attached doesn't work...

Hi,

Your tar.gz is named <jibberish SHA-1>.tar.gz. They way it works is you
set DISTNAME to something sensible and the file will be saved under that
name with the commit hash appended. WRKSRC will be determined correctly.

I would suggest the following approach in this case:

# http://github.com/prlw1/e2guardian/archive/b0c08a6946dd1be087764605cf66c985d969b589.tar.gz
DISTNAME=	e2guardian-3.1.1.42
PKGNAME=	${DISTNAME:C/e2guardian/&-devel/}
CATEGORIES=	www
MASTER_SITES=	${MASTER_SITE_GITHUB:=prlw1/}
GITHUB_PROJECT=	e2guardian
GITHUB_TAG=	b0c08a6946dd1be087764605cf66c985d969b589

... which will yield:

tnn@t3610:e2guardian-devel> make show-var VARNAME=DISTFILES
e2guardian-3.1.1.42-b0c08a6946dd1be087764605cf66c985d969b589.tar.gz

tnn@t3610:e2guardian-devel> make show-var VARNAME=WRKSRC
/tmp/pkgsrc-obj/local/e2guardian-devel/work/e2guardian-b0c08a6946dd1be087764605cf66c985d969b589

Hum. Perhaps GITHUB_PROJECT should be defaulted from DISTNAME rather
than PKGBASE so we don't need to specify it in this case.

Kind regards,
-Tobias


Home | Main Index | Thread Index | Old Index