pkgsrc-WIP-changes archive

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

ast-grep: Install via custom do-install



Module Name:	pkgsrc-wip
Committed By:	Leonardo Taccari <leot%NetBSD.org@localhost>
Pushed By:	leot
Date:		Thu Aug 24 12:10:34 2023 +0200
Changeset:	46b00c1edcabc43fcc46e6c5d6e9fdc9575fa5a9

Modified Files:
	ast-grep/Makefile
	ast-grep/PLIST

Log Message:
ast-grep: Install via custom do-install

It seems that several other cargo users in pkgsrc are doing that.
cargo-cult them.

(Leave a big FIXME though because there are several cargo users
that do not need any of that!)

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=46b00c1edcabc43fcc46e6c5d6e9fdc9575fa5a9

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ast-grep/Makefile | 7 +++++++
 ast-grep/PLIST    | 5 ++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diffs:
diff --git a/ast-grep/Makefile b/ast-grep/Makefile
index 7067e0f412..f5e1964757 100644
--- a/ast-grep/Makefile
+++ b/ast-grep/Makefile
@@ -13,5 +13,12 @@ LICENSE=	mit
 
 USE_LANGUAGES=	c c++
 
+INSTALLATION_DIRS+=	bin
+
+# FIXME: It would be nice if this can be automatically handled, please see TODO
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/target/release/ast-grep ${DESTDIR}${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/target/release/sg ${DESTDIR}${PREFIX}/bin
+
 .include "../../lang/rust/cargo.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/ast-grep/PLIST b/ast-grep/PLIST
index 92ba51a2d7..145ede090b 100644
--- a/ast-grep/PLIST
+++ b/ast-grep/PLIST
@@ -1,4 +1,3 @@
 @comment $NetBSD$
-@comment TODO: to fill this file with the file listing:
-@comment TODO: 1. run "/usr/bin/make package"
-@comment TODO: 2. run "/usr/bin/make print-PLIST"
+bin/ast-grep
+bin/sg


Home | Main Index | Thread Index | Old Index