summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilhelm Schuster2022-02-22 21:01:02 +0100
committerWilhelm Schuster2022-02-22 21:01:02 +0100
commit87b170aab800ae05801b39dd1e67af87fe873282 (patch)
tree851f4f9a8abc404ffb578460ce2e32140291da3f
downloadaur-87b170aab800ae05801b39dd1e67af87fe873282.tar.gz
Initial commit
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore1
-rw-r--r--PKGBUILD40
3 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..805e93eb5155
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = klipper-estimator
+ pkgdesc = A tool for determining the time a print will take on a 3D printer running Klipper firmware
+ pkgver = 1.7.0
+ pkgrel = 1
+ url = https://github.com/Annex-Engineering/klipper_estimator
+ arch = x86_64
+ arch = i686
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = custom:MIT
+ makedepends = cargo
+ source = klipper-estimator-1.7.0.tar.gz::https://github.com/Annex-Engineering/klipper_estimator/archive/v1.7.0.tar.gz
+ sha512sums = a9238f5c405f283ff437fb4583d5aea61fa7e6f95c02e0d863a0a2bf725b39e74a5b677a808089010d19085c20a9411858b3e6e54ed9c5444781d3623a22492d
+
+pkgname = klipper-estimator
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..33662f5545b8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..fac6b81a8909
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Wilhelm Schuster <aur [aT] rot13 dot io>
+
+pkgname=klipper-estimator
+_pkgname=${pkgname/-/_}
+pkgver=1.7.0
+pkgrel=1
+pkgdesc="A tool for determining the time a print will take on a 3D printer running Klipper firmware"
+url="https://github.com/Annex-Engineering/klipper_estimator"
+arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
+license=("custom:MIT")
+makedepends=(cargo)
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Annex-Engineering/${_pkgname}/archive/v${pkgver}.tar.gz")
+sha512sums=('a9238f5c405f283ff437fb4583d5aea61fa7e6f95c02e0d863a0a2bf725b39e74a5b677a808089010d19085c20a9411858b3e6e54ed9c5444781d3623a22492d')
+
+prepare() {
+ cd "$_pkgname-$pkgver"
+
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$_pkgname-$pkgver"
+
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+
+ # Build expects git metadata to generate version string, building from
+ # .tar.gz we don't have that so fall back onto defining an environment
+ # variable.
+ export TOOL_VERSION=${pkgver}
+ cargo build --frozen --release --all-features
+}
+
+package() {
+ cd "$_pkgname-$pkgver"
+
+ install -Dm755 target/release/$_pkgname -T "${pkgdir}/usr/bin/$pkgname"
+ install -Dm644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 compat/CuraPostProcessing/KlipperEstimator.py "${pkgdir}/usr/lib/cura/plugins/PostProcessingPlugin/scripts/KlipperEstimator.py"
+}