File:  [cvs.NetBSD.org] / pkgsrc / sysutils / xplr / Makefile
Revision 1.50: download - view: text, annotated - select for diffs
Sat Oct 29 20:34:43 2022 UTC (2 years, 1 month ago) by pin
Branches: MAIN
CVS tags: HEAD
sysutils/xplr: update to 0.20.0

Changes & fixes
 - BREAKING: xplr shell (:!) will default to null (\0) delimited pipes, as
   opposed to newline (\n) delimited ones (i.e. will use Call0 instead of
   Call).
 - Use new messages for safer file path handling (\0 delimited):
    - Call0
    - CallSilently0
    - BashExec0
    - BashExecSilently0
 - Use new sub-commands for safer message passing:
    -m FORMAT [ARGUMENT]... / --pipe-msg-in FORMAT [ARGUMENT]...
    -M FORMAT [ARGUMENT]... / --print-msg-in FORMAT [ARGUMENT]...
     Where FORMAT is a YAML string that may contain %s, %q and %%
     placeholders and ARGUMENT is the value per placeholder. See init.lua.
 - Following hooks can be defined in the config files using an optional
   return { on_* = { list, of, messages }, ... } statement at the end.
    - on_load
    - on_focus_change
    - on_directory_change
 - Use --vroot to isolate navigation of an xplr session inside a specific
   directory. Interaction still requires passing full path, and shell,
   lua functions etc still can access paths outside vroot.
   Use the following messages to switch vroot at runtime, or the use key
   bindings available in the new builtin mode "vroot" (mapped to : v).
    - SetVroot
    - UnsetVroot
    - ToggleVroot
    - ResetVroot
 - Use $XPLR_INITIAL_PWD and Lua equivalent to implement workspace like
   features without using virtual root. Use keys gi to go to the initial
   working directory from anywhere.
 - Use the convenient xplr.util utility functions in your Lua function calls.
   See xplr.util API docs.
 - Improved CLI errors.
 - Finished documentation (finally).
 - UI updates to handle newlines in path.

Thanks to @jmcantrell for reporting and help implement fix for the critical
newline-in-pathname bug.

# $NetBSD: Makefile,v 1.50 2022/10/29 20:34:43 pin Exp $

DISTNAME=	xplr-0.20.0
CATEGORIES=	sysutils
MASTER_SITES=	${MASTER_SITE_GITHUB:=sayanarijit/}
GITHUB_TAG=	v${PKGVERSION_NOREV}

MAINTAINER=	pin@NetBSD.org
HOMEPAGE=	https://xplr.dev/
COMMENT=	Hackable, minimal, fast TUI file explorer
LICENSE=	mit

.include "cargo-depends.mk"

USE_TOOLS+=	pkg-config bash:run

INSTALLATION_DIRS=	bin share/examples/xplr share/applications share/icons/hicolor/scalable/apps

RUSTFLAGS+=	-C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.LuaJIT2}/lib
RUSTFLAGS+=	-C link-arg=-L${BUILDLINK_PREFIX.LuaJIT2}/lib

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/target/release/xplr \
		${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/src/init.lua \
		${DESTDIR}${PREFIX}/share/examples/xplr
	${INSTALL_DATA} ${WRKSRC}/assets/desktop/xplr.desktop \
		${DESTDIR}${PREFIX}/share/applications
	${INSTALL_DATA} ${WRKSRC}/assets/icon/xplr.svg \
		${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps

.include "../../lang/rust/cargo.mk"
.include "../../lang/LuaJIT2/buildlink3.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

CVSweb <webmaster@jp.NetBSD.org>