summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD50
1 files changed, 28 insertions, 22 deletions
diff --git a/PKGBUILD b/PKGBUILD
index f36ef987e737..abd53bf26890 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,41 +1,47 @@
# Maintainer: Caleb Maclennan <caleb@alerque.com>
+_binname=sn
pkgname=tin-summer
pkgver=1.21.14
-pkgrel=1
+pkgrel=2
pkgdesc='Find build artifacts that are taking up disk space'
-arch=('x86_64')
+arch=(x86_64)
url="https://github.com/vmchale/$pkgname"
-license=('BSD')
-makedepends=('rust')
-conflicts=('mono')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
+license=(BSD)
+makedepends=(cargo)
+conflicts=(mono)
+_archive="$pkgname-$pkgver"
+source=("$_archive.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('8a4883b7a6354c6340e73a87d1009c0cc79bdfa135fe947317705dad9f0a6727')
-_binname=sn
prepare() {
- cd "$pkgname-$pkgver"
- mkdir -p ./target/release/completions
- cargo fetch
+ cd "$_archive"
+ mkdir -p ./target/release/completions
+ # Upstream Issue: https://github.com/vmchale/tin-summer/issues/35
+ cargo update
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}
build() {
- cd "$pkgname-$pkgver"
- export BASH_COMPLETIONS_DIR="./target/release/completions"
- export FISH_COMPLETIONS_DIR="./target/release/completions"
- cargo build --release --locked --features bash,fish
- mv ./target/release/completions/$_binname{.bash,}
+ cd "$_archive"
+ export BASH_COMPLETIONS_DIR="./target/release/completions"
+ export FISH_COMPLETIONS_DIR="./target/release/completions"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --features bash,fish
+ mv ./target/release/completions/$_binname{.bash,}
}
check() {
- cd "$pkgname-$pkgver"
- cargo check --release --locked
+ cd "$_archive"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --features bash,fish
}
package() {
- cd "$pkgname-$pkgver"
- install -Dm755 -t "$pkgdir/usr/bin/" "target/release/$_binname"
- install -Dm664 -t "$pkgdir/usr/share/licenses/$pkgname/" "LICENSE"
- install -Dm644 -t "$pkgdir/usr/share/bash-completion/completions/" target/release/completions/$_binname
- install -Dm644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" target/release/completions/$_binname.fish
+ cd "$_archive"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_binname"
+ install -Dm0664 -t "$pkgdir/usr/share/licenses/$pkgname/" "LICENSE"
+ install -Dm0644 -t "$pkgdir/usr/share/bash-completion/completions/" "target/release/completions/$_binname"
+ install -Dm0644 -t "$pkgdir/usr/share/fish/vendor_completions.d/" "target/release/completions/$_binname.fish"
}