summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorVyacheslav Konovalov2021-03-09 15:07:50 +0500
committerVyacheslav Konovalov2021-03-09 15:07:50 +0500
commit83a9f5c2af4c517e69b75dca7eb728b8cddcd665 (patch)
treeadd5e957cc6a8d93b0bc1ae2b08ddc6a2d704858 /PKGBUILD
downloadaur-83a9f5c2af4c517e69b75dca7eb728b8cddcd665.tar.gz
PKGBUILD for flux 0.106.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c4c13568fbd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Vyacheslav Konovalov <crabvk@protonmail.com>
+
+pkgname=flux
+pkgver=0.106.0
+pkgrel=1
+pkgdesc='Lightweight scripting language for querying databases (like InfluxDB) and working with data'
+arch=(i686 x86_64 arm64)
+url='https://github.com/influxdata/flux'
+license=(MIT)
+depends=(gcc-libs)
+makedepends=(git go cargo clang)
+source=("git+https://github.com/influxdata/flux#tag=v$pkgver")
+sha512sums=('SKIP')
+
+build() {
+ cd flux
+
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS='-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw'
+ export PKG_CONFIG=$PWD/pkg-config
+
+ go build -o pkg-config github.com/influxdata/pkg-config
+ go build ./cmd/flux
+
+ target=$(
+ eval $(rustc --print cfg | grep target)
+ echo $target_arch-$target_vendor-$target_os-$target_env
+ )
+ mv libflux/target/$target/release/{libflux.so,fluxdoc} .
+}
+
+package() {
+ cd flux
+
+ install -Dm775 libflux.so -t "$pkgdir/usr/lib"
+ install -Dm775 flux fluxdoc -t "$pkgdir/usr/bin"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/flux"
+}