pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rclone: Use lang/go/go-package.mk and `do-install'
Module Name: pkgsrc-wip
Committed By: Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By: leot
Date: Thu Feb 15 13:58:02 2018 +0100
Changeset: d41b54c46ce225fc61b87e51de800c9646319798
Modified Files:
rclone/Makefile
Log Message:
rclone: Use lang/go/go-package.mk and `do-install'
For Go packages that just install a binary we can just use
lang/go/go-package.mk, set GO_DIST_BASE and GO_SRCPATH and then define a
`do-install' target to just install the binary.
Thanks again to <bsiegert> for the suggestions!
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=d41b54c46ce225fc61b87e51de800c9646319798
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
rclone/Makefile | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diffs:
diff --git a/rclone/Makefile b/rclone/Makefile
index 7b305b36b6..4f7e831b4c 100644
--- a/rclone/Makefile
+++ b/rclone/Makefile
@@ -10,28 +10,16 @@ HOMEPAGE= https://rclone.org/
COMMENT= Rsync for cloud storage
LICENSE= mit
-WRKSRC= ${WRKDIR}/src/github.com/ncw/rclone
-
-.include "../../lang/go/version.mk"
-
-BUILD_DEPENDS+= go-${GO_VERSION}*:../../lang/go
-
-MAKE_ENV+= GOPATH=${WRKDIR}:${PREFIX}/gopkg
+GO_DIST_BASE= ${DISTNAME}
+GO_SRCPATH= github.com/ncw/rclone
INSTALLATION_DIRS+= bin ${PKGMANDIR}/man1
CHECK_RELRO_SKIP+= bin/rclone
-post-extract:
- ${MKDIR} ${WRKSRC}
- ${MV} ${WRKDIR}/${DISTNAME}/* ${WRKSRC}
-
-do-build:
- cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
- go build --ldflags "-s -X github.com/ncw/rclone/fs.Version=${PKGVERSION_NOREV}" -o bin/rclone
-
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/rclone ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/rclone ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/rclone.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+.include "../../lang/go/go-package.mk"
.include "../../mk/bsd.pkg.mk"
Home |
Main Index |
Thread Index |
Old Index