diff options
author | AtomicFS | 2024-05-04 23:06:13 +0200 |
---|---|---|
committer | AtomicFS | 2024-05-04 23:06:13 +0200 |
commit | 1b3720dad5ea7b9ecdd90f8f41983510ef5e77a0 (patch) | |
tree | eb70aa36557c6ab4a107e952daa8bf00912c59e5 | |
parent | f8f81e1e53fc7a6cbeeb0470d605ba5013d43c1d (diff) | |
download | aur-1b3720dad5ea7b9ecdd90f8f41983510ef5e77a0.tar.gz |
tweak rust compilation
Signed-off-by: AtomicFS <vojtech_vesely@white-hat-hacker.icu>
-rw-r--r-- | PKGBUILD | 26 |
1 files changed, 21 insertions, 5 deletions
@@ -1,19 +1,35 @@ -# Maintainer: atomicfs +# Maintainer: atomicfs <https://aur.archlinux.org/account/atomicfs> pkgname=mdbook-template pkgver=1.1.0 pkgrel=1 pkgdesc="A preprocessor for mdbook to use template files with dynamic arguments" url="https://github.com/sgoudham/mdbook-template" -arch=(x86_64) -license=(MIT) -makedepends=(rust cargo) +arch=('x86_64') +license=('MIT') +makedepends=( + 'cargo' +) source=("${url}/archive/v${pkgver}.tar.gz") sha256sums=('1f961da5e07f00179b552c68617880952e6120dd1c4e2ccdf89ad7769d315bb5') +prepare() { + cd "${pkgname}-${pkgver}" + export RUSTUP_TOOLCHAIN=stable + cargo fetch --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() { |