# $NetBSD: Makefile,v 1.8 2021/03/11 08:08:02 pin Exp $ DISTNAME= please-0.3.25 PKGNAME= pleaser-0.3.25 CATEGORIES= security MASTER_SITES= https://gitlab.com/edneville/please/-/archive/v${PKGVERSION_NOREV}/ MAINTAINER= pin@NetBSD.org HOMEPAGE= https://gitlab.com/edneville/please/ COMMENT= Sudo like program with regex support LICENSE= gnu-gpl-v3 .include "cargo-depends.mk" WRKSRC= ${WRKDIR}/please-v0.3.25-b9e56e70908b194f494cdd88c59c20baba2e604d USE_LANGUAGES+= c # rust, but needs a toolchain to link SUBST_CLASSES+= prefix SUBST_MESSAGE.prefix= Fixing paths. SUBST_STAGE.prefix= pre-configure SUBST_FILES.prefix+= man/please.1 SUBST_FILES.prefix+= man/please.ini.5 SUBST_FILES.prefix+= src/util.rs SUBST_FILES.prefix+= src/bin/please.rs SUBST_FILES.prefix+= src/bin/pleaseedit.rs SUBST_SED.prefix+= -e 's,/etc/please.ini,${PREFIX}/etc/please.ini,g' SUBST_SED.prefix+= -e 's,/usr/local,${PREFIX},g' SUBST_SED.prefix+= -e 's,/usr/bin/please,${PREFIX}/bin/please,g' SPECIAL_PERMS+= bin/please ${SETUID_ROOT_PERMS} SPECIAL_PERMS+= bin/pleaseedit ${SETUID_ROOT_PERMS} INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 do-install: ${INSTALL_PROGRAM} ${WRKSRC}/target/release/please ${DESTDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/target/release/pleaseedit ${DESTDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/man/please.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/please.1 ${INSTALL_MAN} ${WRKSRC}/man/please.ini.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/please.ini.5 .include "../../lang/rust/cargo.mk" .include "../../mk/bsd.pkg.mk"