summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorMatthew Gamble2021-09-12 11:56:01 +1000
committerMatthew Gamble2021-09-12 11:56:01 +1000
commitcf4af798c6299dac956593b1fb733ecd6aa433d3 (patch)
tree76f2366094a16cb348f06c347f36c5df7e7606c9 /PKGBUILD
parent3c47e5805d7f9c04eda725fcf3c8db8731c99a18 (diff)
downloadaur-cpc-calc.tar.gz
Updates to conform to latest rust packaging guidelines
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD15
1 files changed, 7 insertions, 8 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 45320d40730..39c1933e3df 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=cpc-calc
pkgver=1.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="Text calculator with support for units and conversion"
arch=("x86_64")
url="https://github.com/probablykasper/cpc"
@@ -15,22 +15,21 @@ sha512sums=(
"218ac7d1bebeb3caf21293312bbca9e59283b455285463faa63d4812f7d86cbdd1853ea8efefbbb5b6ce08dd1c0a83684355cb17707846310fd126f339823222"
)
-build() {
- cd "cpc-${pkgver}"
-
- RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target
+prepare() {
+ cargo fetch --locked --manifest-path "cpc-${pkgver}/Cargo.toml"
}
check() {
cd "cpc-${pkgver}"
-
- RUSTUP_TOOLCHAIN=stable cargo test --release --locked --target-dir=target
+ RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
}
package() {
cd "cpc-${pkgver}"
- install -Dm755 target/release/cpc "${pkgdir}/usr/bin/cpc"
+ RUSTUP_TOOLCHAIN=stable
+ cargo install --no-track --locked --offline --all-features --root "${pkgdir}/usr/" --path .
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/cpc-calc/LICENSE"
install -Dm644 README.md "${pkgdir}/usr/share/doc/cpc-calc/README.md"
install -Dm644 CHANGELOG.md "${pkgdir}/usr/share/doc/cpc-calc/CHANGELOG.md"