1
0
mirror of https://github.com/bertptrs/aur.git synced 2025-12-25 20:40:32 +01:00
Files
aur/cargo-cache/PKGBUILD
Bert Peters 2fc3c7fdfc upgpkg: cargo-cache 0.8.1-1
upstream release. Also disable upstream's vendoring of libgit2 as Arch
ships a recent enough version not to need it.
2021-12-28 16:06:19 +01:00

34 lines
1017 B
Bash

# Maintainer: Bert Peters <bert@bertptrs.nl>
# Contributor: Jason Nader <jason d0t nader pr0t0nmail.c0m>
pkgname=cargo-cache
pkgver=0.8.1
pkgrel=1
pkgdesc="Display info and prune cargo cache"
arch=('x86_64')
url="https://github.com/matthiaskrgr/cargo-cache"
source=("$pkgname-$pkgver.tar.gz::https://github.com/matthiaskrgr/cargo-cache/archive/$pkgver.tar.gz")
license=('MIT' 'Apache')
depends=('cargo')
sha256sums=('39ed11a8bb62ee8e3f6e53b6d39fd82eef1a03a8858d59077f1f83abe72800a9')
depends=('libgit2')
makedepends=('cargo')
prepare() {
cd "$pkgname-$pkgver"
# Upstream vendors libgit2 because they depend on a "recent" version but Arch already ships
# that version. Let's undo the vendoring.
sed -i "s|\[\"vendored-libgit2\"\]|\[\]|" Cargo.toml
}
build() {
cd "$pkgname-$pkgver"
cargo build --release --locked
}
package() {
cd "$pkgname-$pkgver"
install -Dm755 "target/release/cargo-cache" "$pkgdir/usr/bin/cargo-cache"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE-MIT
}