summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5773ec74b775c04a3a2493f5f594f2c9f4241655 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Maintainer: Jason Nader <jason d0t nader pr0t0nmail.c0m>

pkgname=cargo-cache-git
_pkgname=cargo-cache
pkgver=0.4.2.1098.ga354167
pkgrel=1
pkgdesc="Display info and prune cargo cache"
arch=('x86_64')
url="https://github.com/matthiaskrgr/cargo-cache"
source=("${pkgname%-*}::git+https://github.com/matthiaskrgr/cargo-cache")
license=('MIT')
depends=('cargo')
makedepends=('cargo')
provides=('cargo-cache')
conflicts=('cargo-cache')
sha256sums=('SKIP')

pkgver() {
	cd "$_pkgname"
	echo $(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2).$(git rev-list --count HEAD).g$(git describe --always)
}

build() {
	cd "$_pkgname"
	cargo build --release
}

package() {
	cd "$_pkgname"
	install -Dm755 "$srcdir/${pkgname%-*}/target/release/cargo-cache" "$pkgdir/usr/bin/cargo-cache"
	install -Dm644 LICENSE-MIT "$pkgdir"/usr/share/licenses/"${pkgname%-*}"/LICENSE
}