aboutsummaryrefslogtreecommitdiffstats
path: root/community/postgresql-timescaledb/APKBUILD
blob: ccb0c8af026e8ac53f51e70f5ea38dadeb1c0bd8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Contributor: wener <wenermail@gmail.com>
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: wener <wenermail@gmail.com>
#
# Keep in sync with non-free/postgresql-timescaledb-tsl.
#
pkgname=postgresql-timescaledb
_projname=timescaledb
pkgver=2.5.0
pkgrel=0
pkgdesc="PostgreSQL extension for time‑series 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 perl-ipc-run perl-utils"
install="$pkgname.post-install $pkgname.post-upgrade"
source="https://github.com/timescale/timescaledb/archive/$pkgver/postgresql-timescaledb-$pkgver.tar.gz
	dont-use-git-describe.patch
	fix-build.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
	# CMAKE_BUILD_TYPE - note that 'None' doesn't work here!
	# APACHE_ONLY - we cannot provide non-free software in Alpine repos;
	#  users can build TSL module themselves with aport non-free/postgresql-timescaledb-tsl.
	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 \
		-DAPACHE_ONLY=ON
	make -C build
}

check() {
	make -C build test
}

package() {
	make -C build install DESTDIR="$pkgdir"
}

sha512sums="
fcb3130b472d7ebbaabcce6259b5585ceff2c2b39abeb68f13f2bf5e715afb6a5ccab8534ea9e8eea0c7aef31045680e17f48ff46465d7e693450f1cd77001e4  postgresql-timescaledb-2.5.0.tar.gz
1416d7314fb6bc9c115587c86dabb2aff01a4c7e6e9ae842e5021276c21c61c9db4e73e6e0b1732af1b15419218248228447822b3f08e38729a08aaf8d99b521  dont-use-git-describe.patch
fe542830c3aad330c6c1da6e83cc308d749787f7ef7bb23eec7e834f1264aa2ca93b9e272f34c92b42dbb5ca9ea93e311831dd5910d6ac8e9afbc92725439eaf  fix-build.patch
"