summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-08-20 00:00:31 +0300
committerCaleb Maclennan2021-08-20 00:00:56 +0300
commit82206949fe638cc7ee5e09bcb2bc36adda0c4d50 (patch)
tree6aa82195d23b5a571c08302654c1705ac1573714
parentb05fef5288ac99c6bdb8588390861bc60a77619a (diff)
downloadaur-82206949fe638cc7ee5e09bcb2bc36adda0c4d50.tar.gz
Switch packaging to source build (old packaging republished as krankerl-bin)
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD45
2 files changed, 39 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5e960de70b72..228d42403702 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
pkgbase = krankerl
- pkgdesc = A CLI helper to manage, package and publish Nextcloud apps
+ pkgdesc = A CLI helper to manage, package, and publish Nextcloud apps
pkgver = 0.13.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/ChristophWurst/krankerl
arch = x86_64
- license = GPL-3.0
+ license = GPL3
+ makedepends = cargo
depends = libcurl-gnutls
- source = krankerl-0.13.1::https://github.com/ChristophWurst/krankerl/releases/download/v0.13.1/krankerl
- sha256sums = eeb9bf382622390693bf05bf62a479effdd791a0e2c429c6cdae427b032e64a9
+ source = krankerl-0.13.1.tar.gz::https://github.com/ChristophWurst/krankerl/archive/v0.13.1.tar.gz
+ sha256sums = a9b838b4392a452197448faea03dcf6231cc6f21f6ff2ac9a659ffc334aad8a7
pkgname = krankerl
-
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"
+}