From 30dd1c1f8bf5c994da3be3002b0a697aa184010c Mon Sep 17 00:00:00 2001 From: KF-Art Date: Tue, 14 Feb 2023 22:42:46 -0600 Subject: [PATCH] New Package: runas-2021.01.31_1 --- srcpkgs/runas/template | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 srcpkgs/runas/template diff --git a/srcpkgs/runas/template b/srcpkgs/runas/template new file mode 100644 index 0000000..8627869 --- /dev/null +++ b/srcpkgs/runas/template @@ -0,0 +1,33 @@ +# Template file for 'runas' +pkgname=runas +version=2021.01.31 +revision=2 +archs="x86_64 x86_64-musl i686" +conf_files="/etc/runas.yml" +repository="cereus-extra" +build_style=cargo +hostmakedepends="git" +short_desc="An alternative to sudo and doas written in Rust" +maintainer="Kevin F. " +license="GPL-3.0-or-later" +homepage="https://github.com/keyboard-slayer/runas" + +do_fetch() { + git clone ${homepage} ${wrksrc} +} + +do_install() { + if [ "$XBPS_TARGET_MACHINE" = "x86_64-musl" ]; then + vbin target/x86_64-unknown-linux-musl/release/runas + elif [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then + vbin target/x86_64-unknown-linux-gnu/release/runas + elif [ "$XBPS_TARGET_MACHINE" = "i686" ]; then + vbin target/i686-unknown-linux-gnu/release/runas + fi +} + +post_install() { + vlicense LICENSE + cat src/runas.yml | head -n +5 | tee src/runas.yml + vinstall src/runas.yml 644 etc/ +}