[arch-commits] Commit in cargo-audit/trunk (PKGBUILD)
Frederik Schwan
freswa at gemini.archlinux.org
Wed Dec 15 14:28:17 UTC 2021
Date: Wednesday, December 15, 2021 @ 14:28:17
Author: freswa
Revision: 1073083
adapt rust packaging guidelines
Modified:
cargo-audit/trunk/PKGBUILD
----------+
PKGBUILD | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-12-15 14:19:49 UTC (rev 1073082)
+++ PKGBUILD 2021-12-15 14:28:17 UTC (rev 1073083)
@@ -12,20 +12,26 @@
sha256sums=('f0370c87c7a7976387303c7b5cc06651979968358b4f4dc867d30d65fab4d323')
b2sums=('95b71e78b689e3fa19ba38b4ee427cf231e320fdfa9070a1a19932a29fe5502c647b8dee4c713a1b11822a3871e58e1566246b279e02b5124bea9b36ba58b89d')
+prepare() {
+ cd rustsec-${pkgname}-v${pkgver}/${pkgname}
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
build() {
cd rustsec-${pkgname}-v${pkgver}/${pkgname}
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
cargo build --release --locked
}
check() {
cd rustsec-${pkgname}-v${pkgver}/${pkgname}
+ export RUSTUP_TOOLCHAIN=stable
cargo test --release --locked
}
package() {
- cd rustsec-${pkgname}-v${pkgver}
+ cd rustsec-${pkgname}-v${pkgver}/${pkgname}
install -Dm755 target/release/${pkgname} -t "${pkgdir}"/usr/bin
- install -Dm644 ${pkgname}/LICENSE-MIT -t "${pkgdir}"/usr/share/licenses/${pkgname}
+ install -Dm644 LICENSE-MIT -t "${pkgdir}"/usr/share/licenses/${pkgname}
}
-
-# vim: ts=2 sw=2 et:
More information about the arch-commits
mailing list