pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/pup pup: Use lang/go/go-package.mk (NFCI)



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5d2930667b53
branches:  trunk
changeset: 375589:5d2930667b53
user:      leot <leot%pkgsrc.org@localhost>
date:      Fri Feb 16 12:21:28 2018 +0000

description:
pup: Use lang/go/go-package.mk (NFCI)

Instead of (re)defining logic to build packages with Go in
`post-extract' and `do-build' directly use lang/go/go-package.mk
and adjust `do-install' target accordingly.

Discussed with <fhajny>.

diffstat:

 www/pup/Makefile |  20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diffs (38 lines):

diff -r b03837e1c8e6 -r 5d2930667b53 www/pup/Makefile
--- a/www/pup/Makefile  Fri Feb 16 12:16:57 2018 +0000
+++ b/www/pup/Makefile  Fri Feb 16 12:21:28 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2017/05/08 10:25:29 leot Exp $
+# $NetBSD: Makefile,v 1.5 2018/02/16 12:21:28 leot Exp $
 
 DISTNAME=              pup-0.4.0
 PKGREVISION=           2
@@ -11,24 +11,14 @@
 COMMENT=               Parsing HTML at the command line
 LICENSE=               mit
 
-WRKSRC=                        ${WRKDIR}/src/github.com/ericchiang/pup
-
-.include "../../lang/go/version.mk"
+GO_DIST_BASE=          ${DISTNAME}
+GO_SRCPATH=            github.com/ericchiang/pup
 
-BUILD_DEPENDS+=                go-${GO_VERSION}*:../../lang/go
-
-MAKE_ENV+=             GOPATH=${WRKDIR}:${PREFIX}/gopkg
 INSTALLATION_DIRS+=    bin share/doc/pup
 
-post-extract:
-       ${MKDIR} ${WRKSRC}
-       ${MV} ${WRKDIR}/${DISTNAME}/* ${WRKSRC}
-
-do-build:
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} go build -o bin/pup
-
 do-install:
-       ${INSTALL_PROGRAM} ${WRKSRC}/bin/pup ${DESTDIR}${PREFIX}/bin
+       ${INSTALL_PROGRAM} ${WRKDIR}/bin/pup ${DESTDIR}${PREFIX}/bin
        ${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/pup
 
+.include "../../lang/go/go-package.mk"
 .include "../../mk/bsd.pkg.mk"



Home | Main Index | Thread Index | Old Index