summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAtomicFS2024-05-04 22:56:29 +0200
committerAtomicFS2024-05-04 22:56:29 +0200
commit8c31956b11519c1d5d7b187ad123a787e84ef205 (patch)
tree58f6b4018b2e660f18013cb430db1bd682603cc6 /PKGBUILD
parent1c4465c0fcc62152c2594824f45ae402b19b85f0 (diff)
downloadaur-8c31956b11519c1d5d7b187ad123a787e84ef205.tar.gz
tweak rust compilation
Signed-off-by: AtomicFS <vojtech_vesely@white-hat-hacker.icu>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD16
1 files changed, 15 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index c5ac90b09434..690764ed6ef2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -13,9 +13,23 @@ makedepends=(
source=("${url}/archive/v${pkgver}.tar.gz")
sha256sums=('c5a76a6dbb4a27bff9dfae4398c32497206c3667d70aa7ec8f32a7d98ab11a83')
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
+}
+
build() {
cd "${pkgname}-${pkgver}"
- cargo build --release
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
}
package() {