pkgsrc/pkgtools/pkglint/Makefile

79 lines
2.4 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.660 2020/06/28 10:19:11 rillig Exp $
PKGNAME= pkglint-20.2.0
CATEGORIES= pkgtools
DISTNAME= tools
MASTER_SITES= ${MASTER_SITE_GITHUB:=golang/}
GITHUB_PROJECT= tools
GITHUB_TAG= 92d8274bd7b8a4c65f24bafe401a029e58392704
MAINTAINER= rillig@NetBSD.org
2018-01-28 14:40:22 +01:00
HOMEPAGE= https://github.com/rillig/pkglint
COMMENT= Verifier for NetBSD packages
LICENSE= 2-clause-bsd
CONFLICTS+= pkglint4-[0-9]*
USE_TOOLS+= pax
AUTO_MKDIRS= yes
GO_SRCPATH= golang.org/x/tools
GO_DIST_BASE= ${GO_SRCPATH}
GO_BUILD_PATTERN= netbsd.org/pkglint/...
CHECK_RELRO_SKIP+= bin/pkglint
SUBST_CLASSES+= pkglint
SUBST_STAGE.pkglint= post-configure
SUBST_FILES.pkglint+= ${WRKSRC.pkglint}/pkglint.go
SUBST_SED.pkglint+= -e s\|@VERSION@\|${PKGVERSION}\|g
SUBST_SED.pkglint+= -e s\|@BMAKE@\|${MAKE:T:Q}\|g
1999-07-02 15:57:56 +02:00
EXTRACT_PAX_ARGS= -s ',.*/CVS$$,,' -s ',.*/CVS/.*,,' -s ',.*/\..*,,'
WRKSRC.tools= ${WRKSRC}/golang.org/x/tools
WRKSRC.pkglint= ${WRKSRC}/netbsd.org/pkglint
PREPEND_PATH+= ${WRKDIR}/bin # for goyacc
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}
pre-build:
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} install -v golang.org/x/tools/cmd/goyacc
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} generate ${GO_BUILD_PATTERN}
do-test:
${RUN} ${PKGSRC_SETENV} ${MAKE_ENV} ${GO} test -vet=off -v ${GO_BUILD_PATTERN}
do-install:
${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
post-install: do-install-man
# 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"
do-install-man: .PHONY
.if ${MANINSTALL:Mcatinstall}
. if ${CATMAN_SECTION_SUFFIX:M[Yy][Ee][Ss]}
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1/pkglint.1
. else
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.0 ${DESTDIR}${PREFIX}/${PKGMANDIR}/cat1
. endif
2007-09-29 15:39:22 +02:00
.endif
.if ${MANINSTALL:Mmaninstall}
${INSTALL_MAN} ${WRKSRC.pkglint}/pkglint.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
.endif
.include "../../devel/go-check/buildlink3.mk"
pkgtools/pkglint: update to 5.7.2 Changes since 5.7.1: * Fixed detection of GNU_CONFIGURE=yes combined with USE_LANGUAGES missing c. This combination tends to fail in the configure phase. * When the distinfo doesn't contain all hashes for the downloaded distfiles (typically SHA512 is missing) and the distfiles are actually downloaded to ${PKGSRCDIR}/distfiles, pkglint can now add the missing hashes. It only does this if there is at least one existing hash and if all existing hashes are correct. * The check for redundant variables has been improved considerably. Before there were several situations in which pkglint didn't get the redundant variable definitions right because its internal model only mimicked reality. The model has been improved and so have the diagnostics. * Pkglint only warns about wrong permissions (for defining or using a variable) when it knows the type of the variable and the permissions for the current file. Before, it had also warned if the permissions for the current file were not explicitly defined. * CFLAGS and LDFLAGS may be appended in buildlink3.mk files. This had been disallowed before, for no apparent reason. There are several places in pkgsrc where especially CFLAGS.${OPSYS} is appended to. * Cleaned up internal handling of relative paths. Previously pkglint sometimes resolved relative paths using the wrong base directory, which led to all kinds of wrong warnings and strange behavior. * Fixed lots of edge cases when parsing Makefile lines. These cases don't occur often but experience tells that the most fundamental code must be as correct as possible (see the handling of relative paths above). * Lots of refactoring and housekeeping, as always.
2019-03-10 20:01:50 +01:00
.include "../../security/go-crypto/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"