2020-07-01 15:17:41 +02:00
|
|
|
# $NetBSD: Makefile,v 1.661 2020/07/01 13:17:41 rillig Exp $
|
1998-08-08 00:11:40 +02:00
|
|
|
|
2020-07-01 15:17:41 +02:00
|
|
|
PKGNAME= pkglint-20.2.1
|
2005-11-21 23:06:30 +01:00
|
|
|
CATEGORIES= pkgtools
|
2018-11-10 12:41:40 +01:00
|
|
|
DISTNAME= tools
|
|
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
|
|
|
|
GITHUB_PROJECT= tools
|
|
|
|
GITHUB_TAG= 92d8274bd7b8a4c65f24bafe401a029e58392704
|
1998-08-08 00:11:40 +02:00
|
|
|
|
2016-12-04 16:28:36 +01:00
|
|
|
MAINTAINER= rillig@NetBSD.org
|
2018-01-28 14:40:22 +01:00
|
|
|
HOMEPAGE= https://github.com/rillig/pkglint
|
2008-01-04 16:59:47 +01:00
|
|
|
COMMENT= Verifier for NetBSD packages
|
2013-10-12 20:09:59 +02:00
|
|
|
LICENSE= 2-clause-bsd
|
2015-11-25 17:53:18 +01:00
|
|
|
CONFLICTS+= pkglint4-[0-9]*
|
1998-08-08 00:11:40 +02:00
|
|
|
|
2018-11-10 12:41:40 +01:00
|
|
|
USE_TOOLS+= pax
|
|
|
|
AUTO_MKDIRS= yes
|
|
|
|
GO_SRCPATH= golang.org/x/tools
|
|
|
|
GO_DIST_BASE= ${GO_SRCPATH}
|
|
|
|
GO_BUILD_PATTERN= netbsd.org/pkglint/...
|
2007-04-16 01:02:04 +02:00
|
|
|
|
2017-07-22 21:32:40 +02:00
|
|
|
CHECK_RELRO_SKIP+= bin/pkglint
|
|
|
|
|
2004-10-16 17:04:26 +02:00
|
|
|
SUBST_CLASSES+= pkglint
|
2005-05-24 23:24:30 +02:00
|
|
|
SUBST_STAGE.pkglint= post-configure
|
2018-11-10 12:41:40 +01:00
|
|
|
SUBST_FILES.pkglint+= ${WRKSRC.pkglint}/pkglint.go
|
|
|
|
SUBST_SED.pkglint+= -e s\|@VERSION@\|${PKGVERSION}\|g
|
2018-08-09 22:21:42 +02:00
|
|
|
SUBST_SED.pkglint+= -e s\|@BMAKE@\|${MAKE:T:Q}\|g
|
1999-07-02 15:57:56 +02:00
|
|
|
|
2019-05-26 15:52:14 +02:00
|
|
|
EXTRACT_PAX_ARGS= -s ',.*/CVS$$,,' -s ',.*/CVS/.*,,' -s ',.*/\..*,,'
|
2018-11-10 12:41:40 +01:00
|
|
|
|
|
|
|
WRKSRC.tools= ${WRKSRC}/golang.org/x/tools
|
|
|
|
WRKSRC.pkglint= ${WRKSRC}/netbsd.org/pkglint
|
|
|
|
|
2018-11-11 21:55:23 +01:00
|
|
|
PREPEND_PATH+= ${WRKDIR}/bin # for goyacc
|
|
|
|
|
2018-11-10 12:41:40 +01:00
|
|
|
post-extract:
|
|
|
|
${RUN} ${MKDIR} ${WRKSRC.pkglint}
|
|
|
|
${RUN} cd ${FILESDIR} && ${PAX} -rw ${EXTRACT_PAX_ARGS} . ${WRKSRC.pkglint}
|
|
|
|
|
|
|
|
${RUN} ${MKDIR} ${WRKSRC.tools}
|
|
|
|
${RUN} ${MV} ${WRKDIR}/tools-*/* ${WRKSRC.tools}
|
2018-11-07 21:58:22 +01:00
|
|
|
|
|
|
|
pre-build:
|
2018-11-10 12:41:40 +01:00
|
|
|
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} install -v golang.org/x/tools/cmd/goyacc
|
2018-11-07 21:58:22 +01:00
|
|
|
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} generate ${GO_BUILD_PATTERN}
|
2016-07-07 14:09:26 +02:00
|
|
|
|
2018-11-10 12:41:40 +01:00
|
|
|
do-test:
|
|
|
|
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} test -vet=off -v ${GO_BUILD_PATTERN}
|
|
|
|
|
|
|
|
do-install:
|
2018-12-17 01:15:39 +01:00
|
|
|
${RUN} cd ${WRKDIR} && ${PAX} -rw bin/pkglint ${DESTDIR}${PREFIX}
|
|
|
|
${RUN} cd ${WRKDIR} && ${PAX} -rw src/netbsd.org/pkglint \
|
|
|
|
pkg/${GO_PLATFORM}/netbsd.org/pkglint* ${DESTDIR}${PREFIX}/gopkg
|
2017-01-01 16:15:47 +01:00
|
|
|
|
2017-03-17 23:43:34 +01:00
|
|
|
post-install: do-install-man
|
2004-05-09 07:13:24 +02:00
|
|
|
|
2018-11-10 12:45:29 +01:00
|
|
|
# This needs to come before bsd.prefs.mk so that SSP_SUPPORTED is properly set.
|
|
|
|
.include "../../lang/go/go-package.mk"
|
|
|
|
WRKSRC= ${WRKDIR}/src # Is set unconditionally by go-package.mk
|
|
|
|
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2016-01-24 03:03:28 +01:00
|
|
|
do-install-man: .PHONY
|
2017-01-01 16:15:47 +01:00
|
|
|
.if ${MANINSTALL:Mcatinstall}
|
|
|
|
. if ${CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss]}
|
2018-11-10 12:41:40 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/pkglint.1
|
2013-09-12 13:18:40 +02:00
|
|
|
. else
|
2018-11-10 12:41:40 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
|
2013-09-12 13:18:40 +02:00
|
|
|
. endif
|
2007-09-29 15:39:22 +02:00
|
|
|
.endif
|
2017-01-01 16:15:47 +01:00
|
|
|
.if ${MANINSTALL:Mmaninstall}
|
2018-11-10 12:41:40 +01:00
|
|
|
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
|
2005-05-23 09:50:40 +02:00
|
|
|
.endif
|
2007-01-06 14:31:26 +01:00
|
|
|
|
2018-12-17 01:15:39 +01:00
|
|
|
.include "../../devel/go-check/buildlink3.mk"
|
2019-03-10 20:01:50 +01:00
|
|
|
.include "../../security/go-crypto/buildlink3.mk"
|
1998-08-08 00:11:40 +02:00
|
|
|
.include "../../mk/bsd.pkg.mk"
|