1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/postgresql-timescaledb/APKBUILD

60 lines
2 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=postgresql-timescaledb
_projname=timescaledb
pkgver=2.3.0
pkgrel=0
pkgdesc="PostgreSQL extension for timeseries data"
url="https://github.com/timescale/timescaledb"
arch="all"
license="Apache-2.0"
provides="timescaledb=$pkgver-r$pkgrel" # for backward compatibility
makedepends="postgresql-dev cmake bash"
install="$pkgname-tsl.pre-install"
subpackages="$pkgname-tsl"
source="https://github.com/timescale/timescaledb/archive/$pkgver/postgresql-timescaledb-$pkgver.tar.gz
dont-use-git-describe.patch
"
builddir="$srcdir/$_projname-$pkgver"
options="!check" # FIXME: see comment on REGRESS_CHECKS=OFF below
export USE_PGXS=1
build() {
# CFLAGS - performance is more important than binary size in this case
# REGRESS_CHECKS=OFF - disable regress test
# regress need https://github.com/timescale/timescaledb/blob/master/test/pg_isolation_regress.sh
# which need to compile pg - https://github.com/timescale/timescaledb/issues/1655#issuecomment-578683986
# DCMAKE_BUILD_TYPE - note that 'None' doesn't work here!
cmake -B build . \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_C_FLAGS_RELEASE="${CFLAGS/-Os/-O2} -DNDEBUG" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DREGRESS_CHECKS=OFF
make -C build
}
check() {
make -C build test
}
package() {
make -C build install DESTDIR="$pkgdir"
}
tsl() {
pkgdesc="$pkgdesc - features licensed under Timescale License"
depends="$pkgname=$pkgver-r$pkgrel"
license="LicenseRef-TSL"
amove usr/lib/postgresql/timescaledb-tsl-*.so
install -D -m 644 "$builddir"/tsl/LICENSE-TIMESCALE \
"$subpkgdir"/usr/share/licenses/$pkgname/LICENSE-TIMESCALE
}
sha512sums="
1dac0969fb90840ccf5e3e458643903c56ded6028b6be32a6d0a02088333404f20d02509a22a80e0aad4903b61d7be9d4b9fe17cd4f60e8ba055620b15e8d6f3 postgresql-timescaledb-2.3.0.tar.gz
7daf0c9a3dbf3da874ea3bae7031b23332147116794e6c629764e77abf9ba8b42fdc06a61c8aeb285bdc232a64c71dfc5360e28d8524db9cb6f99930a2b14d1f dont-use-git-describe.patch
"