summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer.json13
-rw-r--r--php-pecl-pq.spec70
2 files changed, 53 insertions, 30 deletions
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..31faebd
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,13 @@
+{
+ "name": "m6w6/ext-pq",
+ "type": "php-ext",
+ "license": "BSD-2-Clause",
+ "description": "PostgreSQL client library (libpq) binding",
+ "require": {
+ "php": ">= 7.0.0",
+ "ext-raphf": "*"
+ },
+ "php-ext": {
+ "extension-name": "pq"
+ }
+}
diff --git a/php-pecl-pq.spec b/php-pecl-pq.spec
index 35ab051..d1bffe4 100644
--- a/php-pecl-pq.spec
+++ b/php-pecl-pq.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-pq
#
-# SPDX-FileCopyrightText: Copyright 2014-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2014-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -11,24 +11,35 @@
# Build using "--without tests" to disable tests
%bcond_without tests
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name pq
-%global pie_vend m6w6
-%global pie_proj ext-pq
-#global prever RC1
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name pq
+%global pie_vend m6w6
+%global pie_proj ext-pq
+#global prever RC1
-%global ini_name 50-%{pecl_name}.ini
+%global ini_name 50-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}
-%global _configure ../%{sources}/configure
+%global sources %{archivename}
+%global _configure ../%{sources}/configure
+
+# Github forge
+%global gh_vend %{pie_vend}
+%global gh_proj %{pie_proj}
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag v%{version}
+# for EL-8 to avoid TAG usage
+%global archivename %{gh_proj}-%{version}
-Summary: PostgreSQL client library (libpq) binding
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 2.2.3
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Summary: PostgreSQL client library (libpq) binding
License: BSD-2-Clause
-URL: https://pecl.php.net/package/%{pecl_name}
+Version: 2.2.3
+Release: 6%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
+# Not yet in tag
+Source1: https://raw.githubusercontent.com/m6w6/ext-pq/refs/heads/master/composer.json
Patch0: 53.patch
@@ -36,7 +47,6 @@ BuildRequires: libpq-devel > 9
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
BuildRequires: %{?scl_prefix}php-pecl-raphf-devel >= 1.1.0
%if %{with tests}
@@ -77,12 +87,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# Don't install tests
-sed -e '/role="test"/d' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
-
cd %{sources}
+cp %{SOURCE1} .
%patch -P0 -p1 -b .pr53
# Sanity check, really often broken
@@ -138,20 +144,12 @@ cd ../ZTS
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
%if %{with_zts}
%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
-# Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
-done
-
%check
: ignore tests with erratic results
@@ -218,10 +216,15 @@ exit $RET
%files
-%doc %{pecl_docdir}/%{pecl_name}
%license %{sources}/LICENSE
+%doc %{sources}/composer.json
+%doc %{sources}/AUTHORS
+%doc %{sources}/BUGS
+%doc %{sources}/CREDITS
+%doc %{sources}/THANKS
+%doc %{sources}/TODO
+%doc %{sources}/*.md
-%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -232,6 +235,13 @@ exit $RET
%changelog
+* Tue Mar 17 2026 Remi Collet <remi@remirepo.net> - 2.2.3-6
+- drop pear/pecl dependency
+- sources from github
+
+* Tue Nov 18 2025 Remi Collet <remi@remirepo.net> - 2.2.3-5
+- rebuild
+
* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 2.2.3-4
- ignore 1 test failing with 8.5.0alpha3 reported as
https://github.com/m6w6/ext-pq/issues/54