summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-19 08:03:11 +0100
committerRemi Collet <remi@remirepo.net>2020-01-19 08:03:11 +0100
commit9bfb9a457cff6dc5c162a77df03ffcc32b26f0f0 (patch)
tree2a214c526e00b8e8160fad7b575fc98bce5fb686
parent576aa1a2e97941a09096b0ed65feab3398a19236 (diff)
tweak port used for test
-rw-r--r--php-pecl-pq.spec7
1 files changed, 2 insertions, 5 deletions
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec
index 8f2dd81..16830a7 100644
--- a/php-pecl-pq.spec
+++ b/php-pecl-pq.spec
@@ -235,11 +235,8 @@ RET=0
: Running a server
DATABASE=$PWD/data
-%ifarch x86_64
-PORT=5440
-%else
-PORT=5436
-%endif
+PORT=$(%{__php} -r 'echo 5432 + PHP_MINOR_VERSION + PHP_INT_SIZE + 0%{?scl:1};')
+
pg_ctl initdb -D $DATABASE
cat <<EOF >>$DATABASE/postgresql.conf
unix_socket_directories = '$DATABASE'