[arch-commits] Commit in (4 files)
George Rawlinson
grawlinson at gemini.archlinux.org
Thu Sep 23 08:08:24 UTC 2021
Date: Thursday, September 23, 2021 @ 08:08:24
Author: grawlinson
Revision: 1021740
addpkg: promscale_extension 0.2.0-3
Added:
promscale_extension/
promscale_extension/repos/
promscale_extension/trunk/
promscale_extension/trunk/PKGBUILD
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Added: promscale_extension/trunk/PKGBUILD
===================================================================
--- promscale_extension/trunk/PKGBUILD (rev 0)
+++ promscale_extension/trunk/PKGBUILD 2021-09-23 08:08:24 UTC (rev 1021740)
@@ -0,0 +1,54 @@
+# Maintainer: George Rawlinson <george at rawlinson.net.nz>
+
+pkgname=promscale_extension
+pkgver=0.2.0
+pkgrel=3
+pkgdesc="PostgreSQL extension for Promscale"
+arch=('x86_64')
+url="https://github.com/timescale/promscale_extension"
+license=('custom:Timescale')
+depends=('gcc-libs' 'postgresql' 'timescaledb')
+makedepends=('rust' 'clang' 'llvm')
+optdepends=('promscale: for a local promscale instance')
+# last commit to license - used to pin license version
+_license_commit='490e9405874d284735e27e3f9f63a2f6dd31a08f'
+source=(
+ "$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
+ "LICENSE-TIMESCALE-$_license_commit::https://raw.githubusercontent.com/timescale/timescaledb/$_license_commit/tsl/LICENSE-TIMESCALE"
+)
+b2sums=('be01d7835ba13efd104fed3c9380d928580d05763d4e482bb404cba1086de21ce65d01be50af8223d313a153632095fbe0636055e9c3c72ae72c2fe6e94f61d9'
+ '9ae11a930e930953b16f7d6d1d3fbf0ebb6c4d8687cac1475560603442ed8edd452200468f7fe9c82af651d40ccad192c036940bfe57ef093e7c30cce93383f0')
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ # upstream uses their own fork of the pgx library (ref: README.md)
+ # additionally, a different branch/commit is present in Cargo.lock
+ # so this is probably the cleanest method of building
+ local PGX_REPO='https://github.com/JLockerman/pgx.git'
+ local PGX_BRANCH='timescale'
+ local PGX_COMMIT='87e0460e6e88d6ffa9b9eb37dce4b71e4336e31e'
+ cargo install \
+ --git "$PGX_REPO" \
+ --branch "$PGX_BRANCH" \
+ --rev "$PGX_COMMIT" \
+ cargo-pgx
+
+ # initialise pgx
+ cargo pgx init --pg13 pg_config
+
+ # build extension
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ # extension
+ make DESTDIR="$pkgdir" install
+
+ # licenses
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE NOTICE
+ install -Dm644 "$srcdir/LICENSE-TIMESCALE-$_license_commit" \
+ "$pkgdir/usr/share/licenses/$pkgname/LICENSE-TIMESCALE"
+}
More information about the arch-commits
mailing list