From ec4753963e190f2721fed92375ed074cf3e500e4 Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Mon, 2 Aug 2021 22:37:06 +0000 Subject: [PATCH] addpkg: sad 0.4.8-3 --- sad/PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 sad/PKGBUILD diff --git a/sad/PKGBUILD b/sad/PKGBUILD new file mode 100644 index 0000000..3d354ff --- /dev/null +++ b/sad/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: George Rawlinson +# Contributor: Joost Bremmer +# Contributor: Eliezio Oliveira +# Contributor: Matthew Gamble + +pkgname=sad +pkgver=0.4.8 +pkgrel=3 +pkgdesc="Space Age seD" +arch=('x86_64') +url="https://github.com/ms-jpq/sad" +license=('MIT') +makedepends=('rust') +optdepends=( + 'fzf: for tui usage' + 'diff-so-fancy: for diff colourizer' + 'git-delta: for diff colourizer' +) +source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") +b2sums=('95591e5bce26dfa9507ced99b0197e8d103a9b0fbda6b712ec0296188563092d9dfcd0744462c53111f6a3ca1ab7aa2834b621614edd3731f2d01db557fbb6f7') + +prepare() { + cd "$pkgname-$pkgver" + # cargo's lockfile is currently out of sync :( + cargo update + + # download dependencies + cargo fetch --locked +} + +build() { + cd "$pkgname-$pkgver" + cargo build --release --offline --locked --all-features +} + +check() { + cd "$pkgname-$pkgver" + cargo test --locked +} + +package() { + cd "$pkgname-$pkgver" + + # binary + install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname" + + # license + install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE + + # documentation + install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md +} + +# vim: set ts=2 sts=2 sw=2 et :