|
59 | 59 | # Run cmake install first
|
60 | 60 | cmake --install . --prefix=$out
|
61 | 61 |
|
62 |
| - # TimescaleDB has two libraries: |
63 |
| - # 1. timescaledb.so (loader) |
64 |
| - # 2. timescaledb-VERSION.so (actual extension) |
65 |
| - # Both need to be handled for multi-version support |
| 62 | + # TimescaleDB creates two libraries: |
| 63 | + # 1. timescaledb.so (loader) -> rename to timescaledb-<version>-loader.so |
| 64 | + # 2. timescaledb-<version>.so (actual extension) -> keep as is |
66 | 65 |
|
67 |
| - # Rename the loader to be version-specific |
| 66 | + # Rename the loader library to be version-specific |
68 | 67 | if [ -f $out/lib/timescaledb${postgresql.dlSuffix} ]; then
|
69 |
| - mv $out/lib/timescaledb${postgresql.dlSuffix} $out/lib/timescaledb-${version}${postgresql.dlSuffix} |
| 68 | + mv $out/lib/timescaledb${postgresql.dlSuffix} $out/lib/timescaledb-${version}-loader${postgresql.dlSuffix} |
70 | 69 | fi
|
71 | 70 |
|
72 | 71 | # The versioned library (timescaledb-VERSION.so) is already correctly named
|
@@ -110,12 +109,12 @@ buildEnv {
|
110 | 109 | cat $out/share/postgresql/extension/${pname}--${latestVersion}.control
|
111 | 110 | } > $out/share/postgresql/extension/${pname}.control
|
112 | 111 |
|
113 |
| - # Create symlink for the loader |
114 |
| - ln -sfn ${pname}-${latestVersion}${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix} |
| 112 | + # Create symlink from the latest versioned loader to timescaledb.so |
| 113 | + ln -sfn ${pname}-${latestVersion}-loader${postgresql.dlSuffix} $out/lib/${pname}${postgresql.dlSuffix} |
115 | 114 |
|
116 |
| - # The versioned library symlink (timescaledb-VERSION.so files are already in place) |
| 115 | + # The versioned extension libraries (timescaledb-VERSION.so) are already in place |
117 | 116 |
|
118 |
| - # checks - adjust count since we have both loader and versioned files |
| 117 | + # checks - we should have loader files and versioned extension files |
119 | 118 | (set -x
|
120 | 119 | test "$(ls -A $out/lib/${pname}*${postgresql.dlSuffix} | wc -l)" -gt 0
|
121 | 120 | )
|
|
0 commit comments