summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Gamble2021-07-15 22:05:11 +1000
committerMatthew Gamble2021-07-15 22:05:11 +1000
commit2d332e033f45057c4ea430dc2b8648f2a99aa11c (patch)
treee9b2c741478a470000c9045b51fab2c7fdadfc0e
downloadaur-2d332e033f45057c4ea430dc2b8648f2a99aa11c.tar.gz
Initial release
-rw-r--r--.SRCINFO12
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD37
3 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..36c9c9b5c91
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,12 @@
+pkgbase = cpc-calc
+ pkgdesc = Text calculator with support for units and conversion
+ pkgver = 1.7.0
+ pkgrel = 1
+ url = https://github.com/probablykasper/cpc
+ arch = x86_64
+ license = MIT
+ makedepends = cargo
+ source = https://github.com/probablykasper/cpc/archive/refs/tags/v1.7.0.tar.gz
+ sha512sums = 864cbcfb60f80163e000f056b100ff5ffd59d9b5e0d7b3111817590fe47ede969af16a03705b27316c74d9504d03caa82bc0c1964705f75332400337d5474e0c
+
+pkgname = cpc-calc
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..e38eb34d4ee
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+*.pkg.tar.*
+*.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f2b6dce75b5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Matthew Gamble <git@matthewgamble.net>
+
+pkgname=cpc-calc
+pkgver=1.7.0
+pkgrel=1
+pkgdesc="Text calculator with support for units and conversion"
+arch=("x86_64")
+url="https://github.com/probablykasper/cpc"
+license=("MIT")
+makedepends=("cargo")
+source=(
+ "https://github.com/probablykasper/cpc/archive/refs/tags/v${pkgver}.tar.gz"
+)
+sha512sums=(
+ "864cbcfb60f80163e000f056b100ff5ffd59d9b5e0d7b3111817590fe47ede969af16a03705b27316c74d9504d03caa82bc0c1964705f75332400337d5474e0c"
+)
+
+build() {
+ cd "cpc-${pkgver}"
+
+ RUSTUP_TOOLCHAIN=stable cargo build --release --locked --all-features --target-dir=target
+}
+
+check() {
+ cd "cpc-${pkgver}"
+
+ RUSTUP_TOOLCHAIN=stable cargo test --release --locked --target-dir=target
+}
+
+package() {
+ cd "cpc-${pkgver}"
+
+ install -Dm755 target/release/cpc "${pkgdir}/usr/bin/cpc"
+ 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"
+}