diff --git a/tests/postgresql-odbc/generate.sh b/tests/postgresql-odbc/generate.sh new file mode 100755 index 000000000..000f3e0bf --- /dev/null +++ b/tests/postgresql-odbc/generate.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +################################################################################ + +template="postgresql-odbc.template" + +################################################################################ + +main() { + local pg + + for pg in 10 11 12 13 14 15 16 ; do + generate "$pg" + done +} + +generate() { + local pg="$1" + local output + + output="postgresql${pg}-odbc.recipe" + + cat "$template" > "$output" + sed -i "s/%PG_VERSION%/$pg/g" "$output" + + echo "✔ $output (PostgreSQL $pg)" +} + +################################################################################ + +main "$@" diff --git a/tests/postgresql-odbc/postgresql-odbc.template b/tests/postgresql-odbc/postgresql-odbc.template new file mode 100644 index 000000000..2960ea4b8 --- /dev/null +++ b/tests/postgresql-odbc/postgresql-odbc.template @@ -0,0 +1,27 @@ +# Bibop recipe for ODBC driver for PostgreSQL %PG_VERSION% +# See more: https://kaos.sh/bibop + +pkg postgresql%PG_VERSION%-odbc + +fast-finish yes + +var pg_ver %PG_VERSION% +var pg_dir /usr/pgsql-{pg_ver} +var pg_lib {pg_dir}/lib + +command "-" "Check shared libraries" + exist {pg_lib}/psqlodbc.so + exist {pg_lib}/psqlodbca.so + exist {pg_lib}/psqlodbcw.so + + mode {pg_lib}/psqlodbca.so 755 + mode {pg_lib}/psqlodbcw.so 755 + + link {LIBDIR}/psqlodbc.so {pg_lib}/psqlodbcw.so + link {LIBDIR}/psqlodbca.so {pg_lib}/psqlodbca.so + link {LIBDIR}/psqlodbcw.so {pg_lib}/psqlodbcw.so + + lib-linked {pg_lib}/psqlodbca.so libpq.so.* + lib-linked {pg_lib}/psqlodbca.so libodbcinst.so.* + lib-linked {pg_lib}/psqlodbcw.so libpq.so.* + lib-linked {pg_lib}/psqlodbcw.so libodbcinst.so.* diff --git a/tests/postgresql-odbc/postgresql10-odbc.recipe b/tests/postgresql-odbc/postgresql10-odbc.recipe index 2351cc24b..c82c166b0 100644 --- a/tests/postgresql-odbc/postgresql10-odbc.recipe +++ b/tests/postgresql-odbc/postgresql10-odbc.recipe @@ -3,6 +3,8 @@ pkg postgresql10-odbc +fast-finish yes + var pg_ver 10 var pg_dir /usr/pgsql-{pg_ver} var pg_lib {pg_dir}/lib diff --git a/tests/postgresql-odbc/postgresql11-odbc.recipe b/tests/postgresql-odbc/postgresql11-odbc.recipe index 484a131de..cb8487850 100644 --- a/tests/postgresql-odbc/postgresql11-odbc.recipe +++ b/tests/postgresql-odbc/postgresql11-odbc.recipe @@ -3,6 +3,8 @@ pkg postgresql11-odbc +fast-finish yes + var pg_ver 11 var pg_dir /usr/pgsql-{pg_ver} var pg_lib {pg_dir}/lib diff --git a/tests/postgresql-odbc/postgresql12-odbc.recipe b/tests/postgresql-odbc/postgresql12-odbc.recipe index 77062e06f..cae0a06b6 100644 --- a/tests/postgresql-odbc/postgresql12-odbc.recipe +++ b/tests/postgresql-odbc/postgresql12-odbc.recipe @@ -3,6 +3,8 @@ pkg postgresql12-odbc +fast-finish yes + var pg_ver 12 var pg_dir /usr/pgsql-{pg_ver} var pg_lib {pg_dir}/lib diff --git a/tests/postgresql-odbc/postgresql13-odbc.recipe b/tests/postgresql-odbc/postgresql13-odbc.recipe index f28279d02..1cef50b24 100644 --- a/tests/postgresql-odbc/postgresql13-odbc.recipe +++ b/tests/postgresql-odbc/postgresql13-odbc.recipe @@ -3,6 +3,8 @@ pkg postgresql13-odbc +fast-finish yes + var pg_ver 13 var pg_dir /usr/pgsql-{pg_ver} var pg_lib {pg_dir}/lib diff --git a/tests/postgresql-odbc/postgresql14-odbc.recipe b/tests/postgresql-odbc/postgresql14-odbc.recipe index f705213fa..f6eed6582 100644 --- a/tests/postgresql-odbc/postgresql14-odbc.recipe +++ b/tests/postgresql-odbc/postgresql14-odbc.recipe @@ -3,6 +3,8 @@ pkg postgresql14-odbc +fast-finish yes + var pg_ver 14 var pg_dir /usr/pgsql-{pg_ver} var pg_lib {pg_dir}/lib diff --git a/tests/postgresql-odbc/postgresql15-odbc.recipe b/tests/postgresql-odbc/postgresql15-odbc.recipe index dc9a97222..32aab53f9 100644 --- a/tests/postgresql-odbc/postgresql15-odbc.recipe +++ b/tests/postgresql-odbc/postgresql15-odbc.recipe @@ -3,6 +3,8 @@ pkg postgresql15-odbc +fast-finish yes + var pg_ver 15 var pg_dir /usr/pgsql-{pg_ver} var pg_lib {pg_dir}/lib diff --git a/tests/postgresql-odbc/postgresql16-odbc.recipe b/tests/postgresql-odbc/postgresql16-odbc.recipe new file mode 100644 index 000000000..b332e8428 --- /dev/null +++ b/tests/postgresql-odbc/postgresql16-odbc.recipe @@ -0,0 +1,27 @@ +# Bibop recipe for ODBC driver for PostgreSQL 16 +# See more: https://kaos.sh/bibop + +pkg postgresql16-odbc + +fast-finish yes + +var pg_ver 16 +var pg_dir /usr/pgsql-{pg_ver} +var pg_lib {pg_dir}/lib + +command "-" "Check shared libraries" + exist {pg_lib}/psqlodbc.so + exist {pg_lib}/psqlodbca.so + exist {pg_lib}/psqlodbcw.so + + mode {pg_lib}/psqlodbca.so 755 + mode {pg_lib}/psqlodbcw.so 755 + + link {LIBDIR}/psqlodbc.so {pg_lib}/psqlodbcw.so + link {LIBDIR}/psqlodbca.so {pg_lib}/psqlodbca.so + link {LIBDIR}/psqlodbcw.so {pg_lib}/psqlodbcw.so + + lib-linked {pg_lib}/psqlodbca.so libpq.so.* + lib-linked {pg_lib}/psqlodbca.so libodbcinst.so.* + lib-linked {pg_lib}/psqlodbcw.so libpq.so.* + lib-linked {pg_lib}/psqlodbcw.so libodbcinst.so.*