summaryrefslogtreecommitdiffstats
path: root/php-pecl-solr2.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2026-04-14 08:28:36 +0200
committerRemi Collet <remi@php.net>2026-04-14 08:28:36 +0200
commit4621e41ddadef573def649a73986efff643bf0f0 (patch)
tree1c42145a8498acee145a441141d58f383f7a01fc /php-pecl-solr2.spec
parent6385b09028402f06d7282126c170d377ad56e4b5 (diff)
update to 2.9.3HEADmaster
drop pear/pecl dependency sources from github
Diffstat (limited to 'php-pecl-solr2.spec')
-rw-r--r--php-pecl-solr2.spec68
1 files changed, 29 insertions, 39 deletions
diff --git a/php-pecl-solr2.spec b/php-pecl-solr2.spec
index 41c6eb4..b9925a6 100644
--- a/php-pecl-solr2.spec
+++ b/php-pecl-solr2.spec
@@ -3,7 +3,7 @@
#
# Fedora spec file for php-pecl-solr2
#
-# SPDX-FileCopyrightText: Copyright 2011-2025 Remi Collet
+# SPDX-FileCopyrightText: Copyright 2011-2026 Remi Collet
# SPDX-License-Identifier: CECILL-2.1
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
@@ -13,13 +13,18 @@
%global pecl_name solr
%global pie_vend pecl
-%global pie_proj solr
+%global pie_proj %{pecl_name}
#global prever b
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
# After 20-curl, 40-json
%global ini_name 50-%{pecl_name}.ini
-%global sources %{pecl_name}-%{version}%{?prever}
-%global _configure ../%{sources}/configure
+%global _configure ../configure
+
+# Github forge
+%global gh_vend php
+%global gh_proj pecl-search_engine-solr
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+%global tag %{version}
# For full test (using localhost server) use --with fulltests
# retrieve: podman pull docker.io/omars/solr53
@@ -28,21 +33,18 @@
%bcond_without tests
%bcond_with fulltests
-Summary: Object oriented API to Apache Solr
-Summary(fr): API orientée objet pour Apache Solr
Name: %{?scl_prefix}php-pecl-solr2
-Version: 2.9.1
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Summary: Object oriented API to Apache Solr
License: PHP-3.01
-Group: Development/Languages
-URL: https://pecl.php.net/package/solr
-
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
+Version: 2.9.3
+Release: 1%{?dist}
+%forgemeta
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: (%{?scl_prefix}php-devel >= 7.4 with %{?scl_prefix}php-devel < 8.6)
-BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-curl
BuildRequires: %{?scl_prefix}php-json
BuildRequires: curl-devel
@@ -91,14 +93,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -c -q
-
-# Don't install/register tests
-sed -e 's/role="test"/role="src"/' \
- -e '/LICENSE/s/role="doc"/role="src"/' \
- -i package.xml
+%forgesetup
-cd %{sources}
: Check version
extver=$(sed -n '/#define PHP_SOLR_VERSION /{s/.* "//;s/".*$//;p}' src/php_solr_version.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -106,8 +102,6 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
exit 1
fi
-cd ..
-
# Create configuration file
cat > %{ini_name} << 'EOF'
; Enable Solr extension module
@@ -123,14 +117,14 @@ mkdir ZTS
%build
%{?dtsenable}
-cd %{sources}
%{__phpize}
sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global
-cd ../NTS
+cd NTS
%configure \
--with-libdir=%{_lib} \
--with-php-config=%{__phpconfig}
+
%make_build
%if %{with_zts}
@@ -138,6 +132,7 @@ cd ../ZTS
%configure \
--with-libdir=%{_lib} \
--with-php-config=%{__ztsphpconfig}
+
%make_build
%endif
@@ -147,9 +142,6 @@ cd ../ZTS
%make_install -C NTS
-# Install XML package description
-install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-
# install config file
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
@@ -159,14 +151,7 @@ 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
-cd %{sources}
%if %{with fulltests}
export SOLR_SERVER_CONFIGURED=1
%else
@@ -185,9 +170,7 @@ OPT="-n"
%if %{with tests}
: Upstream test suite for NTS extension
-TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="$OPT -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff
%endif
@@ -200,9 +183,11 @@ REPORT_EXIT_STATUS=1 \
%files
-%license %{sources}/LICENSE
-%doc %{pecl_docdir}/%{pecl_name}
-%{pecl_xmldir}/%{name}.xml
+%license LICENSE
+%doc composer.json
+%doc README.*
+%doc docs
+%doc examples
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
@@ -214,6 +199,11 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Apr 14 2026 Remi Collet <remi@remirepo.net> - 2.9.3-1
+- update to 2.9.3
+- drop pear/pecl dependency
+- sources from github
+
* Tue Nov 25 2025 Remi Collet <remi@remirepo.net> - 2.9.1-1
- update to 2.9.1
- drop patch merged upstream