[arch-commits] Commit in (4 files)
George Rawlinson
grawlinson at gemini.archlinux.org
Mon Sep 20 23:52:20 UTC 2021
Date: Monday, September 20, 2021 @ 23:52:20
Author: grawlinson
Revision: 1019877
addpkg: timescaledb-tune 0.11.2-1
Added:
timescaledb-tune/
timescaledb-tune/repos/
timescaledb-tune/trunk/
timescaledb-tune/trunk/PKGBUILD
----------+
PKGBUILD | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
Added: timescaledb-tune/trunk/PKGBUILD
===================================================================
--- timescaledb-tune/trunk/PKGBUILD (rev 0)
+++ timescaledb-tune/trunk/PKGBUILD 2021-09-20 23:52:20 UTC (rev 1019877)
@@ -0,0 +1,49 @@
+# Maintainer: George Rawlinson <george at rawlinson.net.nz>
+
+pkgname=timescaledb-tune
+pkgver=0.11.2
+pkgrel=2
+pkgdesc="A tool for tuning TimescaleDB for better performance"
+arch=('x86_64')
+url="https://github.com/timescale/timescaledb-tune"
+license=('Apache')
+depends=('glibc' 'postgresql')
+makedepends=('go')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha512sums=('48bca0a16a19f42406b72ae302e6a6c1e59ac4cde952996dfbb507ae302b29c4da4fd394e1cbc90193d8a6fe3ce92229220ef77fef209dc4b7b2fcea7a596cd3')
+b2sums=('9d8a3a01021b6cab0cffa3567560b4ff3d30fb88c8400f767036c777a9b7914376e7be8d913d9962c0617846f3bfcb22d1ab085dd63f95a1371cdbc3f1ad596a')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ # create directory for build output
+ mkdir build
+
+ # download dependencies
+ go mod vendor
+
+ # fix version string
+ sed -i "s/^\tVersion =.*$/\tVersion = \"$pkgver\"/" pkg/tstune/tuner.go
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # set Go flags
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+
+ go build -v \
+ -buildmode=pie \
+ -trimpath \
+ -mod=vendor \
+ -modcacherw \
+ -ldflags "-linkmode external -extldflags ${LDFLAGS}" \
+ -o build \
+ ./cmd/...
+}
+
+package() {
+ install -Dm755 -t "$pkgdir/usr/bin" "$pkgname-$pkgver/build/$pkgname"
+}
More information about the arch-commits
mailing list