summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Gamble2021-09-12 11:46:30 +1000
committerMatthew Gamble2021-09-12 11:46:30 +1000
commit6dd15bdf9f99eb0f0e0d4de7a7b24067bc5f8697 (patch)
tree7bf2f03d88c709e86c0d4fea72efdbf155e87fcd
parent6374966dc526495a97d1f9657cb7834b356ea939 (diff)
downloadaur-6dd15bdf9f99eb0f0e0d4de7a7b24067bc5f8697.tar.gz
Update to latest release and match updated rust packaging guidelines
It's not perfect. I can't seem to find a working value for the 'cargo fetch' --target flag, and for some reason I have to use '--locked --offline' when running 'cargo install', because cargo still wants to consult crates.io when using --frozen for some unknown reason.
-rw-r--r--PKGBUILD20
1 files changed, 16 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 036285e93c5..fa6aad4f7cb 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,32 @@
# Maintainer: Matthew Gamble <git@matthewgamble.net>
pkgname=hr-rust
-pkgver=1.0.0
+pkgver=1.0.1
pkgrel=1
pkgdesc="hr in rust"
arch=("i686" "x86_64")
url="https://github.com/djmattyg007/hr-rust"
license=('custom:Public Domain')
source=("https://github.com/djmattyg007/hr-rust/archive/${pkgver}.tar.gz")
-sha512sums=("84a908201fd4903f1549663187252a1f438ed1db6148fb938184d4b87b6a87fd80d8d9669f985fdc9aeaac5ccdb9a01a4086f6541a4f46b589faf970119027dd")
+sha512sums=("b9976e57244e7d7842ebb893b6d1e9a424ef122fd4b50a8a89a485d53241562ec9634503ae38254424d8500b39d809017e2958419950d50fc61189573a548446")
makedepends=("cargo")
conflicts=("hr")
provides=("hr")
+prepare() {
+ cargo fetch --locked --manifest-path "hr-rust-${pkgver}/Cargo.toml"
+}
+
+check() {
+ cd "hr-rust-${pkgver}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
+}
+
package() {
- cd "${srcdir}/hr-rust-${pkgver}"
- cargo install --no-track --locked --all-features --root "${pkgdir}/usr/" --path .
+ cd "hr-rust-${pkgver}"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo install --no-track --locked --offline --all-features --root "${pkgdir}/usr/" --path .
install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/hr-rust/LICENSE.txt"
+ install -Dm644 README.txt "${pkgdir}/usr/share/doc/hr-rust/README.txt"
}