summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Dellinger2020-08-16 12:32:30 +0200
committerJonas Dellinger2020-08-16 12:32:30 +0200
commit9e79663fecfb76447982003ca9db0921d9090e9b (patch)
treeaf89ae599f1021758c14cd2427738371615a0162
parentdab92c965deba88ed272cc7f1f60a954fe6de32a (diff)
downloadaur-9e79663fecfb76447982003ca9db0921d9090e9b.tar.gz
Added template for upcoming ci/cd pipeline
-rw-r--r--PKGBUILD4
-rw-r--r--PKGBUILD.template22
2 files changed, 24 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 9f70098e6f11..4aea0d5021ad 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,8 +15,8 @@ case "${CARCH}" in
arm*) _CARCH=arm && sha256sums=('b93de0bb52c3779c1aadd5a090d343ca39521b82a5137e5d2bd0c003293356b6');;
esac
-source=("${pkgname}-${pkgver}::https://github.com/rancher/k3d/releases/download/v$pkgver/k3d-linux-${_CARCH}")
+source=("${pkgname}-${pkgver}-${_CARCH}::https://github.com/rancher/k3d/releases/download/v$pkgver/k3d-linux-${_CARCH}")
package() {
- install -Dm 0755 ${pkgname}-${pkgver} "$pkgdir/usr/bin/k3d"
+ install -Dm 0755 ${pkgname}-${pkgver}-${_CARCH} "$pkgdir/usr/bin/k3d"
}
diff --git a/PKGBUILD.template b/PKGBUILD.template
new file mode 100644
index 000000000000..a1981ff8a651
--- /dev/null
+++ b/PKGBUILD.template
@@ -0,0 +1,22 @@
+# Maintainer: Jonas Dellinger <jonas@dellinger.dev>
+pkgname="rancher-k3d-bin"
+pkgver=$NEW_RELEASE
+pkgrel=1
+pkgdesc='Little helper to run Rancher Labs k3s in Docker'
+arch=('x86_64' 'aarch64' 'arm' 'armv6h' 'armv7h')
+url='https://github.com/rancher/k3d'
+license=('MIT')
+provides=("k3d")
+conflicts=("rancher-k3d-beta-bin")
+
+case "${CARCH}" in
+ x86_64) _CARCH=amd64 && $SHA256_SUMS_x86_64;;
+ aarch64) _CARCH=arm64 && $SHA256_SUMS_aarch64;;
+ arm*) _CARCH=arm && $SHA256_SUMS_arm;;
+esac
+
+source=("${pkgname}-${pkgver}-${_CARCH}::https://github.com/rancher/k3d/releases/download/v$pkgver/k3d-linux-${_CARCH}")
+
+package() {
+ install -Dm 0755 ${pkgname}-${pkgver}-${_CARCH} "$pkgdir/usr/bin/k3d"
+}