summaryrefslogtreecommitdiffstats
path: root/php-pecl-mongodb2.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-mongodb2.spec')
-rw-r--r--php-pecl-mongodb2.spec63
1 files changed, 33 insertions, 30 deletions
diff --git a/php-pecl-mongodb2.spec b/php-pecl-mongodb2.spec
index b653b3a..9dcb0c8 100644
--- a/php-pecl-mongodb2.spec
+++ b/php-pecl-mongodb2.spec
@@ -20,42 +20,51 @@
%bcond_with syslib
# Bundled versions
-%global bundled_libmongo 2.2.2
-%global bundled_libcrypt 1.17.2
+%global bundled_libmongo 2.2.2
+%global bundled_libcrypt 1.17.2
# Required versions (in config.m4)
-%global minimal_libmongo 2.2.2
-%global minimal_libcrypt 1.17.2
+%global minimal_libmongo 2.2.2
+%global minimal_libcrypt 1.17.2
%if %{with syslib}
# Build dependencies (in repository)
-%global system_libmongo 2.2.2
-%global system_libcrypt 1.17.2
+%global system_libmongo 2.2.2
+%global system_libcrypt 1.17.2
# Runtime dependencies
-%global runtime_libmongo %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{system_libmongo})
-%global runtime_libcrypt %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{system_libcrypt})
+%global runtime_libmongo %(pkg-config --silence-errors --modversion libmongoc-1.0 2>/dev/null || echo %{system_libmongo})
+%global runtime_libcrypt %(pkg-config --silence-errors --modversion libmongocrypt 2>/dev/null || echo %{system_libcrypt})
%endif
-Summary: MongoDB driver for PHP version 2
-Name: %{?scl_prefix}php-pecl-%{pecl_name}2
%global upstream_version 2.2.1
#global upstream_prever beta1
#global upstream_lower ~beta1
-%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
+%global sources %{gh_proj}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
-Version: %{upstream_version}%{?upstream_lower}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+
+# Github forge
+%global gh_vend mongodb
+%global gh_proj mongo-php-driver
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{upstream_version}%{?upstream_prever}
+
+Summary: MongoDB driver for PHP version 2
+Name: %{?scl_prefix}php-pecl-%{pecl_name}2
+Release: 2%{?dist}
%if %{with syslib}
License: Apache-2.0
%else
License: Apache-2.0 AND ISC AND MIT AND Zlib AND BSD-3-Clause
%endif
-URL: https://pecl.php.net/package/%{pecl_name}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
+Version: %{upstream_version}%{?upstream_lower}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{sources}.tgz
+# get git snapshot with submodules
+Source1: makesrc.sh
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 8.1
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-json
%if %{with syslib}
BuildRequires: pkgconfig(libbson-1.0) >= %{system_libmongo}
@@ -119,10 +128,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -q -c
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
pushd %{sources}
# Check our macro values
@@ -218,20 +223,12 @@ peclbuild %{__ztsphpconfig}
# 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
OPT="-n"
@@ -252,8 +249,10 @@ OPT="-n"
%files
%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%doc %{sources}/composer.json
+%doc %{sources}/CREDITS
+%doc %{sources}/THIRD_PARTY_NOTICES
+%doc %{sources}/*.md
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -265,6 +264,10 @@ OPT="-n"
%changelog
+* Thu Mar 12 2026 Remi Collet <remi@remirepo.net> - 2.2.1-2
+- drop pear/pecl dependency
+- sources from github
+
* Fri Feb 13 2026 Remi Collet <remi@remirepo.net> - 2.2.1-1
- update to 2.2.1