summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-yaconf.spec65
3 files changed, 42 insertions, 27 deletions
diff --git a/PHPINFO b/PHPINFO
index 32355aa..3324f60 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,7 +3,7 @@ yaconf
yaconf support => enabled
version => 1.1.2
-yaconf config last check time => Thu May 19 07:16:28 2022
+yaconf config last check time => Mon Sep 4 11:37:34 2023
parsed filename => mtime
diff --git a/REFLECTION b/REFLECTION
index 5eb8660..2f43097 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 yaconf version 1.1.2 ] {
+Extension [ <persistent> extension #125 yaconf version 1.1.2 ] {
- INI {
Entry [ yaconf.directory <SYSTEM> ]
diff --git a/php-pecl-yaconf.spec b/php-pecl-yaconf.spec
index d87b782..c39c2ea 100644
--- a/php-pecl-yaconf.spec
+++ b/php-pecl-yaconf.spec
@@ -6,7 +6,10 @@
#
# Please, preserve the changelog entries
#
-%{?scl: %scl_package php-yaconf}
+
+%{?scl:%scl_package php-yaconf}
+
+%bcond_without tests
%global gh_commit d5f267aff435534e0a4b1c60055cea07e2956bc6
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
@@ -16,18 +19,24 @@
%global pecl_name yaconf
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
+%if 0%{?gh_date:1}
+%global sources %{gh_project}-%{gh_commit}
+%else
+%global sources %{pecl_name}-%{version}
+%endif
+%global _configure ../%{sources}/configure
Summary: Yet Another Configurations Container
Name: %{?scl_prefix}php-pecl-yaconf
Version: 1.1.2
-License: PHP
+License: PHP-3.01
URL: https://github.com/%{gh_owner}/%{gh_project}
%if 0%{?gh_date:1}
Release: 0.5.%{gh_date}.%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}-%{gh_short}.tar.gz
%else
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Source0: https://pecl.php.net/get/%{sources}.tgz
%endif
BuildRequires: make
@@ -37,7 +46,6 @@ BuildRequires: %{?scl_prefix}php-pear
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
-%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
%if "%{php_version}" > "7.4"
@@ -77,16 +85,14 @@ These are the files needed to compile programs using %{name}.
%prep
%setup -qc
+
%if 0%{?gh_date:1}
-mv %{gh_project}-%{gh_commit} NTS
-mv NTS/package.xml .
-%else
-mv %{pecl_name}-%{version} NTS
+mv %{sources}/package.xml .
%endif
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
-cd NTS
+cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_YACONF_VERSION/{s/.* "//;s/".*$//;p}' php_yaconf.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
@@ -95,9 +101,9 @@ if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
fi
cd ..
+mkdir NTS
%if %{with_zts}
-# duplicate for ZTS build
-cp -pr NTS ZTS
+mkdir ZTS
%endif
# Drop in the bit of configuration
@@ -114,18 +120,19 @@ EOF
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
%configure \
- --with-php-config=%{_bindir}/php-config \
+ --with-php-config=%{__phpconfig} \
--enable-yaconf
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
%configure \
- --with-php-config=%{_bindir}/zts-php-config \
+ --with-php-config=%{__ztsphpconfig} \
--enable-yaconf
make %{?_smp_mflags}
%endif
@@ -148,39 +155,44 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Test & Documentation
-for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
+cd %{sources}
+for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
+do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
mkdir -p %{buildroot}%{pecl_testdir}/%{pecl_name}
-cp -pr NTS/tests %{buildroot}%{pecl_testdir}/%{pecl_name}/tests
+cp -pr tests %{buildroot}%{pecl_testdir}/%{pecl_name}/tests
%check
-cd NTS
+cd %{sources}
+
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/../NTS/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php -q --show-diff || : ignore
+%endif
%if %{with_zts}
-cd ../ZTS
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep '^%{pecl_name}$'
+%if %{with tests}
: Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=%{pecl_name}.so" \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/../ZTS/modules -d extension=%{pecl_name}.so" \
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php -q --show-diff
%endif
+%endif
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
@@ -204,7 +216,7 @@ fi
%files
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%doc %{pecl_docdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
@@ -227,6 +239,9 @@ fi
%changelog
+* Mon Sep 4 2023 Remi Collet <remi@remirepo.net> - 1.1.2-2
+- build out of sources tree
+
* Thu May 19 2022 Remi Collet <remi@remirepo.net> - 1.1.2-1
- update to 1.1.2