summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD13
1 files changed, 12 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c9488cdc9670..d8a44eecbc68 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=git-delta
_name="${pkgname#*-}"
pkgver=0.0.17
-pkgrel=1
+pkgrel=2
pkgdesc='A syntax-highlighting pager for git and diff output'
arch=('x86_64')
@@ -18,6 +18,17 @@ source=("$url/archive/$pkgver.tar.gz")
sha256sums=('ac1f26ac5ea10d43b300675189c49437dcae7a9fca7e51f615058ab0550d27e5')
+prepare() {
+ # Assist chroot builds with a persistent cargo cache (hat tip @ccorn for this patch)
+ msg2 "NOTE : If you're building in a (clean) chroot and want a persistant"
+ plain " cargo cache folder specific for this package, you can create"
+ plain " an empty '.cargo' directory next to the 'PKGBUILD'. This will"
+ plain " be recognized and used as CARGO_HOME."
+ if [ -d "$startdir/.cargo" ]; then
+ export CARGO_HOME="${CARGO_HOME:-$startdir/.cargo}"
+ fi
+}
+
build() {
cd "$_name-$pkgver"
cargo build --release --locked