summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD43
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0df39b053408
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = topicctl
+ pkgdesc = Declarative management of Kafka topics
+ pkgver = 0+r55+g4bca417
+ pkgrel = 1
+ url = https://github.com/segmentio/topicctl
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = go
+ depends = glibc
+ source = git+https://github.com/segmentio/topicctl#commit=4bca41738e78c3eb77e4ffa5e6843c176e9fca48
+ sha512sums = SKIP
+
+pkgname = topicctl
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d54a803e7365
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Jean Lucas <jean@4ray.co>
+
+pkgname=topicctl
+pkgver=0+r55+g4bca417
+_commit=4bca41738e78c3eb77e4ffa5e6843c176e9fca48
+pkgrel=1
+pkgdesc='Declarative management of Kafka topics'
+arch=(x86_64)
+url=https://github.com/segmentio/$pkgname
+license=(MIT)
+depends=(glibc)
+makedepends=(git go)
+source=(git+https://github.com/segmentio/$pkgname#commit=$_commit)
+sha512sums=('SKIP')
+
+pkgver() {
+ cd $pkgname
+ echo "0+r$(git rev-list --count HEAD)+g$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd $pkgname
+ go build \
+ -buildmode pie \
+ -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" \
+ -mod readonly \
+ -modcacherw \
+ -trimpath \
+ ./cmd/$pkgname
+}
+
+check() {
+ cd $pkgname
+ make test || warning "Tests failed"
+}
+
+package() {
+ cd $pkgname
+ install -D $pkgname -t "$pkgdir"/usr/bin
+ install -Dm 644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
+ cp -a examples "$pkgdir"/usr/share/doc/$pkgname
+ install -Dm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+}