Date: Monday, May 2, 2022 @ 08:17:08 Author: alerque Revision: 1192187
Migrate rust-rage from AUR Added: rust-rage/ rust-rage/repos/ rust-rage/trunk/ rust-rage/trunk/PKGBUILD ----------+ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) Added: rust-rage/trunk/PKGBUILD =================================================================== --- rust-rage/trunk/PKGBUILD (rev 0) +++ rust-rage/trunk/PKGBUILD 2022-05-02 08:17:08 UTC (rev 1192187) @@ -0,0 +1,46 @@ +# Maintainer: Caleb Maclennan <[email protected]> +# Contributor: Daniel Peukert <[email protected]> + +pkgname=rust-rage +_pkgname=${pkgname##rust-} +pkgver=0.8.0 +pkgrel=1 +pkgdesc='Rust implementation of the age encryption tool' +arch=(x86_64 i686 arm armv6h armv7h aarch64) +url="https://github.com/str4d/$_pkgname" +license=(Apache MIT) +depends=(fuse2 + pcsclite) +makedepends=(cargo) +_archive="$_pkgname-$pkgver" +source=("$url/archive/v$pkgver/$_archive.tar.gz") +sha256sums=('727719d0d308998bb2600e730f7c287e40d0d9f77e77817bac03fe037c436449') + +prepare() { + cd "$_archive" + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} + +build() { + cd "$_archive" + cargo build --frozen --release --all-features + cargo run --frozen --release --all-features --example generate-completions + cargo run --frozen --release --all-features --example generate-docs +} + +check() { + cd "$_archive" + cargo test --frozen --all-features +} + +package() { + cd "$_archive" + for bin in "$_pkgname"{,-keygen,-mount}; do + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$bin" + install -Dm0644 -t "$pkgdir/usr/share/man/man1/" "target/manpages/$bin.1.gz" + install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "target/completions/$bin.fish" + install -Dm0644 "target/completions/$bin.bash" "$pkgdir/usr/share/bash-completion/completions/$bin" + install -Dm0644 "target/completions/$bin.zsh" "$pkgdir/usr/share/zsh/site-functions/_$bin" + done + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE-MIT +}
