arch-pkgs/bacon/PKGBUILD

32 lines
864 B
Bash

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=bacon
pkgver=1.1.8
pkgrel=1
pkgdesc="A background rust code checker"
arch=('x86_64')
url="https://github.com/Canop/bacon"
license=('AGPL3')
makedepends=('cargo')
source=("$pkgname-$pkgver.tar.gz::https://static.crates.io/crates/$pkgname/$pkgname-$pkgver.crate")
b2sums=('04c7405508befadf9c6ddeb26c5de82ebb5489f9a98d0947a7a68d379f393b2d3e37c3e5a36274139bed12e65fed4d2024f6f1af229726193ead520f0d72c8d2')
prepare() {
cd "$pkgname-$pkgver"
cargo fetch --locked
}
build() {
cd "$pkgname-$pkgver"
RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target --offline
}
package() {
cd "$pkgname-$pkgver"
# binary
install -vDm755 -t "$pkgdir/usr/bin" "target/release/$pkgname"
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" *.md
}