summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD45
1 files changed, 33 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9c88272855be..1fdcd41b0af4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,18 +1,39 @@
-#Maintainer: Julius Härtl <jus@bitgrid.net>
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
pkgname=krankerl
pkgver=0.13.1
-pkgrel=1
-pkgdesc=" A CLI helper to manage, package and publish Nextcloud apps"
-url="https://github.com/ChristophWurst/krankerl"
-makedepends=()
-arch=('x86_64')
-license=('GPL-3.0')
-depends=('libcurl-gnutls')
-source=("${pkgname}-${pkgver}::https://github.com/ChristophWurst/krankerl/releases/download/v${pkgver}/krankerl")
-sha256sums=('eeb9bf382622390693bf05bf62a479effdd791a0e2c429c6cdae427b032e64a9')
+pkgrel=2
+pkgdesc='A CLI helper to manage, package, and publish Nextcloud apps'
+arch=(x86_64)
+url="https://github.com/ChristophWurst/$pkgname"
+license=(GPL3)
+depends=(libcurl-gnutls)
+makedepends=(cargo)
+_archive="$pkgname-$pkgver"
+source=("$_archive.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('a9b838b4392a452197448faea03dcf6231cc6f21f6ff2ac9a659ffc334aad8a7')
-package() {
- install -Dm755 "${pkgname}-${pkgver}" "$pkgdir/usr/bin/krankerl"
+prepare() {
+ cd "$_archive"
+ # Upstream issue: https://github.com/ChristophWurst/krankerl/issues/875
+ cargo update
+ cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "$_archive"
+ local RUSTUP_TOOLCHAIN=stable
+ local CARGO_TARGET_DIR=target
+ cargo build --frozen --release --all-features
}
+check() {
+ cd "$_archive"
+ local RUSTUP_TOOLCHAIN=stable
+ cargo test --frozen --all-features
+}
+
+package() {
+ cd "$_archive"
+ install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
+}