summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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'