[arch-commits] Commit in timescaledb-old-upgrade/repos (2 files)

George Rawlinson grawlinson at gemini.archlinux.org
Sun Jun 12 07:57:59 UTC 2022


    Date: Sunday, June 12, 2022 @ 07:57:58
  Author: grawlinson
Revision: 1236136

archrelease: copy trunk to community-testing-x86_64

Added:
  timescaledb-old-upgrade/repos/community-testing-x86_64/
  timescaledb-old-upgrade/repos/community-testing-x86_64/PKGBUILD
    (from rev 1236135, timescaledb-old-upgrade/trunk/PKGBUILD)

----------+
 PKGBUILD |   79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 79 insertions(+)

Copied: timescaledb-old-upgrade/repos/community-testing-x86_64/PKGBUILD (from rev 1236135, timescaledb-old-upgrade/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2022-06-12 07:57:58 UTC (rev 1236136)
@@ -0,0 +1,79 @@
+# Maintainer: George Rawlinson <george at rawlinson.net.nz>
+
+_pkgname=timescaledb
+pkgname=timescaledb-old-upgrade
+_commit='7d3c092d21b7ce476e3c0cd8f5c8944695746d3d'
+_current_pg_version=14
+_old_pg_version=$(( _current_pg_version-1 ))
+# limit to last 5 releases
+_versions=(
+  2.5.1
+  2.5.2
+  2.6.0
+  2.6.1
+  2.7.0 # current ts version
+)
+pkgver="${_versions[-1]}"
+pkgrel=1
+pkgdesc='TimescaleDB build for migrating between major versions of PostgreSQL'
+arch=('x86_64')
+url='https://www.timescale.com/'
+license=('Apache' 'custom:Timescale')
+depends=("timescaledb=$pkgver" 'postgresql-old-upgrade')
+makedepends=('git' 'gcc' 'cmake' 'postgresql' 'postgresql-libs')
+source=("$_pkgname::git+https://github.com/timescale/timescaledb#commit=$_commit")
+b2sums=('SKIP')
+
+prepare() {
+  mkdir -p build
+}
+
+build() {
+  for version in "${_versions[@]}"; do
+    cd "$srcdir/$_pkgname"
+
+    git checkout "$version"
+
+    BUILD_DIR="$srcdir/build/$version" ./bootstrap \
+      -DWARNINGS_AS_ERRORS=OFF \
+      -DREGRESS_CHECKS=OFF \
+      -DPG_PATH="/opt/pgsql-${_old_pg_version}"
+
+    # build shared library for $version
+    cd "$srcdir/build/$version"
+    
+    # ensure reproducible builds (value from `lsb_release -r`)
+    # TODO: resolve https://github.com/timescale/timescaledb/issues/3480
+    sed \
+      -e "s:BUILD_OS_VERSION \".*\"$:BUILD_OS_VERSION \"rolling\":" \
+      -i src/config.h
+
+    if [ "$version" == "${_versions[-1]}" ]; then
+      make
+    else
+      make timescaledb timescaledb-tsl sqlfile
+    fi
+  done
+}
+
+package() {
+  cd "$_pkgname"
+  # install licenses from latest version
+  git checkout "${_versions[-1]}"
+  install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
+    LICENSE LICENSE-APACHE tsl/LICENSE-TIMESCALE
+
+  # install package or past shared library
+  for version in "${_versions[@]}"; do
+    cd "$srcdir/build/$version"
+    if [ "$version" == "${_versions[-1]}" ]; then
+      make DESTDIR="$pkgdir/" install
+    else
+      install -vDm755 -t "$pkgdir/opt/pgsql-${_old_pg_version}/lib" \
+        "src/$_pkgname-$version.so" \
+        "tsl/src/$_pkgname-tsl-$version.so"
+      install -Dm644 -t "$pkgdir/opt/pgsql-${_old_pg_version}/share/extension" \
+        "sql/timescaledb--$version.sql"
+    fi
+  done
+}



More information about the arch-commits mailing list