tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
WRKSRC when using github
I'm curious if there is a reason for this distinction in bsd.pkg.mk:
.if defined(GITHUB_TAG)
WRKSRC?= ${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG:C/^v//}
.else
WRKSRC?= ${WRKDIR}/${DISTNAME:U${PKGNAME_NOREV}}
.endif
As far as I can tell, ${GITHUB_PROJECT}-${GITHUB_TAG:C/^v//} produces
the correct WRKSRC whenever GITHUB_PROJECT is defined. I.e., GITHUB_TAG
defaults to the package version.
I noticed this when working on a wip package with DISTNAME lowercased:
DISTNAME= lpjs-0.0.4
GITHUB_PROJECT= LPJS
It might be better to use
DISTNAME= LPJS-${PKGVERSION_NOREV}
PKGNAME= lpjs-0.0.4
in this case, but building WRKSRC differently depending on whether
GITHUB_TAG is defined seems like a side-effect. If there's a problem
with using WRKSRC?=${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG:C/^v//}
universally, I'd at least document it.
--
Life is a game. Play hard. Play fair. Have fun.
Home |
Main Index |
Thread Index |
Old Index