pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/ripgrep



Module Name:    pkgsrc
Committed By:   kim
Date:           Mon Feb 24 21:52:08 UTC 2025

Modified Files:
        pkgsrc/textproc/ripgrep: Makefile PLIST

Log Message:
ripgrep: Install manual page and completion rules


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/textproc/ripgrep/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/textproc/ripgrep/PLIST

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

Modified files:

Index: pkgsrc/textproc/ripgrep/Makefile
diff -u pkgsrc/textproc/ripgrep/Makefile:1.23 pkgsrc/textproc/ripgrep/Makefile:1.24
--- pkgsrc/textproc/ripgrep/Makefile:1.23       Wed Sep 11 07:00:54 2024
+++ pkgsrc/textproc/ripgrep/Makefile    Mon Feb 24 21:52:08 2025
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.23 2024/09/11 07:00:54 pin Exp $
+# $NetBSD: Makefile,v 1.24 2025/02/24 21:52:08 kim Exp $
 
 DISTNAME=      ripgrep-14.1.1
+PKGREVISION=   1
 CATEGORIES=    textproc
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=BurntSushi/}
 
@@ -19,6 +20,41 @@ RUSTFLAGS+=  -C link-arg=-L${BUILDLINK_PR
 CARGO_NO_DEFAULT_FEATURES=     YES
 CARGO_FEATURES+=               pcre2
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${USE_CROSS_COMPILE:tl} != "yes"
+RIPGREP=       ${WRKSRC}/target/release/rg
+.else
+TOOL_DEPENDS+= ${PKGNAME}:../../${PKGPATH}
+RIPGREP=       ${TOOLBASE}/bin/rg
+.endif
+
+post-build:
+       @${STEP_MSG} "Creating manual page..."
+       ${RUN}${RIPGREP} --generate man > ${WRKDIR}/rg.1
+       @${STEP_MSG} "Creating completion rules..."
+       ${RUN}${RIPGREP} --generate complete-bash \
+         > ${WRKDIR}/rg-completion.bash
+       ${RUN}${RIPGREP} --generate complete-fish \
+         > ${WRKDIR}/rg-completion.fish
+       ${RUN}${RIPGREP} --generate complete-zsh \
+         > ${WRKDIR}/rg-completion.zsh
+
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1
+INSTALLATION_DIRS+=    share/bash-completion/completions
+INSTALLATION_DIRS+=    share/fish/vendor_completions.d
+INSTALLATION_DIRS+=    share/zsh/site-functions
+
+post-install:
+       ${INSTALL_MAN} ${WRKDIR}/rg.1 \
+         ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/rg.1
+       ${INSTALL_DATA} ${WRKDIR}/rg-completion.bash \
+         ${DESTDIR}${PREFIX}/share/bash-completion/completions/rg
+       ${INSTALL_DATA} ${WRKDIR}/rg-completion.fish \
+         ${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/rg.fish
+       ${INSTALL_DATA} ${WRKDIR}/rg-completion.zsh \
+         ${DESTDIR}${PREFIX}/share/zsh/site-functions/_rg
+
 .include "../../lang/rust/cargo.mk"
 .include "../../devel/pcre2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/textproc/ripgrep/PLIST
diff -u pkgsrc/textproc/ripgrep/PLIST:1.1 pkgsrc/textproc/ripgrep/PLIST:1.2
--- pkgsrc/textproc/ripgrep/PLIST:1.1   Tue May  8 07:48:39 2018
+++ pkgsrc/textproc/ripgrep/PLIST       Mon Feb 24 21:52:08 2025
@@ -1,2 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2018/05/08 07:48:39 maya Exp $
+@comment $NetBSD: PLIST,v 1.2 2025/02/24 21:52:08 kim Exp $
 bin/rg
+man/man1/rg.1
+share/bash-completion/completions/rg
+share/fish/vendor_completions.d/rg.fish
+share/zsh/site-functions/_rg



Home | Main Index | Thread Index | Old Index