summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD15
2 files changed, 8 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9f8ff52750e..d33d56dd7f7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = cpc-calc
pkgdesc = Text calculator with support for units and conversion
pkgver = 1.8.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/probablykasper/cpc
arch = x86_64
license = MIT
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"