summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Muehlhaeuser2020-10-07 18:00:09 +0200
committerChristian Muehlhaeuser2020-10-07 18:00:09 +0200
commit1b0ffbdbf606717b2595754ec90fd72f0071610a (patch)
tree90ac40244ba1646e80486e816afb31b406de57f4
downloadaur-1b0ffbdbf606717b2595754ec90fd72f0071610a.tar.gz
Initial package charm-tool
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD38
2 files changed, 55 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0c119bd8894
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = charm-tool
+ pkgdesc = The Charm Cloud Tool
+ pkgver = 0.8.3
+ pkgrel = 1
+ url = https://github.com/charmbracelet/charm
+ arch = x86_64
+ arch = i686
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = MIT
+ makedepends = go
+ source = https://github.com/charmbracelet/charm/archive/v0.8.3/charm-0.8.3.tar.gz
+ sha256sums = 735287cb5ef9c836a427aefa6104bb5cd0d006dc90a5d70e4a2df8a1320d6342
+
+pkgname = charm-tool
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2c65ce19cae
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Christian Muehlhaeuser <muesli at gmail dot com>
+
+pkgname=charm-tool
+pkgver=0.8.3
+pkgrel=1
+pkgdesc="The Charm Cloud Tool"
+arch=('x86_64' 'i686' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/charmbracelet/charm"
+license=('MIT')
+makedepends=('go')
+source=("${url}/archive/v${pkgver}/charm-${pkgver}.tar.gz")
+sha256sums=('735287cb5ef9c836a427aefa6104bb5cd0d006dc90a5d70e4a2df8a1320d6342')
+
+build() {
+ cd "charm-$pkgver"/cmd/charm
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+
+ go build \
+ -trimpath \
+ -buildmode=pie \
+ -mod=readonly \
+ -modcacherw \
+ -ldflags "-X main.Version=$pkgver -linkmode external -extldflags \"${LDFLAGS}\"" \
+ -o "charm" .
+}
+
+package() {
+ cd "charm-$pkgver"
+
+ install -Dm755 "cmd/charm/charm" "$pkgdir/usr/bin/charm"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+# vim:set ts=4 sw=4 et: