From 7fdc552e9f3de208313049b2f9d27cc469654a39 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 22 Apr 2026 15:47:06 +0200 Subject: drop pear/pecl dependency sources from github --- REFLECTION | 2 +- composer.json | 25 ++++++++++++++++++++++ php-pecl-jsonpath.spec | 58 ++++++++++++++++++++++---------------------------- 3 files changed, 51 insertions(+), 34 deletions(-) create mode 100644 composer.json diff --git a/REFLECTION b/REFLECTION index 6fe472a..9b77238 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #141 jsonpath version 3.1.0 ] { +Extension [ extension #144 jsonpath version 3.1.0 ] { - Classes [2] { Class [ class JsonPath\JsonPath ] { diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..d203f28 --- /dev/null +++ b/composer.json @@ -0,0 +1,25 @@ +{ + "name": "supermetrics/jsonpath", + "type": "php-ext", + "license": "PHP-3.01", + "description": "Extract data from a decoded JSON document using the versatile JSONPath query language", + "require": { + "php": ">=8.0,<8.6" + }, + "php-ext": { + "extension-name": "jsonpath", + "priority": 80, + "configure-options": [ + { + "name": "enable-jsonpath", + "description": "Whether to enable JSONPath support", + "needs-value": false + }, + { + "name": "enable-code-coverage", + "description": "Whether to enable code coverage (relevant for extension development only!)", + "needs-value": false + } + ] + } +} diff --git a/php-pecl-jsonpath.spec b/php-pecl-jsonpath.spec index d5a4374..33ddf61 100644 --- a/php-pecl-jsonpath.spec +++ b/php-pecl-jsonpath.spec @@ -15,22 +15,28 @@ %global pie_proj jsonpath %global pecl_name jsonpath %global ini_name 50-%{pecl_name}.ini -#global prever RC2 -%global sources %{pecl_name}-%{version}%{?prever} -%global _configure ../%{sources}/configure +%global _configure ../configure + +# Github forge +%global gh_vend supermetrics-public +%global gh_proj pecl-jsonpath +%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: Extract data using JSONPath notation Name: %{?scl_prefix}php-pecl-jsonpath -Version: 3.1.0 -Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Summary: Extract data using JSONPath notation License: PHP-3.01 -URL: https://pecl.php.net/package/%{pecl_name} -Source0: https://pecl.php.net/get/%{sources}.tgz +Version: 3.1.0 +Release: 2%{?dist} +%forgemeta +URL: %{forgeurl} +Source0: %{forgesource} BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 8.0 -BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} Requires: %{?scl_prefix}php(api) = %{php_core_api} @@ -54,21 +60,14 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep -%setup -q -c +%forgesetup -# Don't install/register tests -sed -e 's/role="test"/role="src"/' \ - -e '/LICENSE/s/role="doc"/role="src"/' \ - -i package.xml - -cd %{sources} # Sanity check, really often broken extver=$(sed -n '/#define PHP_JSONPATH_VERSION/{s/.* "//;s/".*$//;p}' php_jsonpath.h) if test "x${extver}" != "x%{version}%{?prever}"; then : Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}. exit 1 fi -cd .. mkdir NTS %if %{with_zts} @@ -85,11 +84,10 @@ EOF %build %{?dtsenable} -cd %{sources} %{__phpize} sed -e 's/INSTALL_ROOT/DESTDIR/' -i build/Makefile.global -cd ../NTS +cd NTS %configure \ --enable-jsonpath \ --with-php-config=%{__phpconfig} @@ -114,24 +112,14 @@ 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 -cd %{sources} - : Minimal load test for NTS extension %{__php} -n \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ @@ -139,7 +127,7 @@ cd %{sources} %if %{with tests} : Upstream test suite for NTS extension -TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n -d extension=$PWD/NTS/modules/%{pecl_name}.so" \ %{__php} -n run-tests.php -q --show-diff %{?_smp_mflags} %endif @@ -152,10 +140,10 @@ TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ %files -%doc %{pecl_docdir}/%{pecl_name} -%license %{sources}/LICENSE +%license LICENSE +%doc composer.json +%doc *.md -%{pecl_xmldir}/%{name}.xml %config(noreplace) %{php_inidir}/%{ini_name} %{php_extdir}/%{pecl_name}.so @@ -166,6 +154,10 @@ TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \ %changelog +* Wed Apr 22 2026 Remi Collet - 3.1.0-2 +- drop pear/pecl dependency +- sources from github + * Fri Dec 5 2025 Remi Collet - 3.1.0-1 - update to 3.1.0 -- cgit