# Maintainer: atomicfs pkgname=mdbook-footnote pkgver=0.1.1 pkgrel=3 pkgdesc="A preprocessor for mdbook to support the inclusion of footnotes" url="https://github.com/daviddrysdale/mdbook-footnote" arch=('x86_64') license=('Apache-2.0') makedepends=( 'cargo' ) depends=( 'mdbook' ) 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}" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target cargo build --frozen --release --all-features } package() { cd "${pkgname}-${pkgver}" install -Dm 755 "target/release/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" }