1 # Maintainer: kpcyrd <git@rxv.cc>
2 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
7 pkgdesc="Audit Cargo.lock for crates with security vulnerabilities"
8 url="https://github.com/RustSec/cargo-audit"
11 license=('MIT' 'APACHE')
13 source=("https://github.com/RustSec/rustsec/archive/${pkgname}/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
14 sha256sums=('d509de3528a2d5c1ee78bf0750ba768f1c9c7cabf1e45d366cb1aed64be514fa')
15 b2sums=('eda1d94a0819e34bb743c8c909ee27a8cd3988ad0e5731d61446c956e97d4158f385374f0c7280c04a587b7ae757f3a17158653407d851fed1073c69dc2d5a40')
18 cd rustsec-${pkgname}-v${pkgver}/${pkgname}
19 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
23 cd rustsec-${pkgname}-v${pkgver}
24 export RUSTUP_TOOLCHAIN=stable
25 export CARGO_TARGET_DIR=target
26 cargo build --release --locked --features fix
30 cd rustsec-${pkgname}-v${pkgver}/${pkgname}
31 export RUSTUP_TOOLCHAIN=stable
32 cargo test --release --locked
36 cd rustsec-${pkgname}-v${pkgver}/${pkgname}
37 install -Dm755 "../target/release/${pkgname}" -t "${pkgdir}"/usr/bin
38 install -Dm644 LICENSE-MIT -t "${pkgdir}"/usr/share/licenses/${pkgname}