summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJason Nader2020-04-11 15:16:36 +0900
committerJason Nader2020-04-11 15:17:42 +0900
commit5ffc804f7aa9cc92906a10d29c09b80be4e2cc25 (patch)
tree993c6b55910411c5968bb1a6ccfc6cbaff5f8351 /PKGBUILD
downloadaur-cargo-cache-git.tar.gz
First commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD32
1 files changed, 32 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5773ec74b77
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,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
+}