1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 # Contributor: Felix Fung <fylixeoi@gmail.com>
6 _commit=5e62e82341a237468b5f31a5e7d6840dec9dfbcb
7 # limit to last 5 releases
13 2.10.3 # current ts version
15 pkgver="${_versions[-1]}"
17 pkgdesc='An open-source time-series database optimized for fast ingest and complex queries'
19 url='https://www.timescale.com/'
20 license=('Apache' 'custom:Timescale')
21 depends=('postgresql<16' 'postgresql-libs<16' 'openssl')
22 makedepends=('gcc' 'cmake' 'git')
24 'timescaledb-tune: tune postgresql.conf for better performance'
25 'timescaledb-old-upgrade: upgrade from previous major version of PostgreSQL'
27 install=timescaledb.install
28 source=("$pkgname::git+https://github.com/timescale/timescaledb#commit=$_commit")
36 for version in "${_versions[@]}"; do
39 git checkout "$version"
41 BUILD_DIR="$srcdir/build/$version" ./bootstrap \
42 -DWARNINGS_AS_ERRORS=OFF \
43 -DREGRESS_CHECKS=OFF \
45 -DGENERATE_DOWNGRADE_SCRIPT=ON
47 # build package or past shared library
48 cd "$srcdir/build/$version"
50 # ensure reproducible builds (value from `lsb_release -r`)
51 # TODO: resolve https://github.com/timescale/timescaledb/issues/3480
53 -e "s:BUILD_OS_VERSION \".*\"$:BUILD_OS_VERSION \"rolling\":" \
56 if [ "$version" == "${_versions[-1]}" ]; then
59 make timescaledb timescaledb-tsl sqlfile
66 # install licenses from latest version
67 git checkout "${_versions[-1]}"
68 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
69 LICENSE LICENSE-APACHE tsl/LICENSE-TIMESCALE
71 # install package or past shared library
72 for version in "${_versions[@]}"; do
73 cd "$srcdir/build/$version"
74 if [ "$version" == "${_versions[-1]}" ]; then
75 make DESTDIR="$pkgdir/" install
77 install -vDm755 -t "$pkgdir/usr/lib/postgresql" \
78 "src/$pkgname-$version.so" \
79 "tsl/src/$pkgname-tsl-$version.so"
80 install -Dm644 -t "$pkgdir/usr/share/postgresql/extension" \
81 "sql/timescaledb--$version.sql"