summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2023-07-19 16:14:07 +0200
committerRemi Collet <remi@php.net>2023-07-19 16:14:07 +0200
commit50879f9a02bd9d2bda315b187db6d6a6b5b03512 (patch)
treeb666210458bfd8fb35b8e8a7adcdbeecb4c3ab9f
parentbbf0605b999e7df9082a50ccef927237f48f60a5 (diff)
build out of sources tree
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION12
-rw-r--r--php-pecl-rrd.spec81
3 files changed, 42 insertions, 53 deletions
diff --git a/PHPINFO b/PHPINFO
index 0baae3c..40f9382 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,4 +3,4 @@ rrd
rrd tool module => enabled
rrd tool module version => 2.0.3
-rrdtool library version => 1.7.2
+rrdtool library version => 1.8.0
diff --git a/REFLECTION b/REFLECTION
index 7ad3478..31a1962 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #120 rrd version 2.0.3 ] {
+Extension [ <persistent> extension #124 rrd version 2.0.3 ] {
- Functions {
Function [ <internal:rrd> function rrd_update ] {
@@ -38,7 +38,7 @@ Extension [ <persistent> extension #120 rrd version 2.0.3 ] {
- Parameters [2] {
Parameter #0 [ <required> $file ]
- Parameter #1 [ <optional> $raaindex ]
+ Parameter #1 [ <optional> $raaindex = <default> ]
}
}
Function [ <internal:rrd> function rrd_info ] {
@@ -64,7 +64,7 @@ Extension [ <persistent> extension #120 rrd version 2.0.3 ] {
- Parameters [3] {
Parameter #0 [ <required> $xml_file ]
Parameter #1 [ <required> $rrd_file ]
- Parameter #2 [ <optional> $options ]
+ Parameter #2 [ <optional> $options = <default> ]
}
}
Function [ <internal:rrd> function rrd_tune ] {
@@ -155,8 +155,8 @@ Extension [ <persistent> extension #120 rrd version 2.0.3 ] {
- Parameters [3] {
Parameter #0 [ <required> $path ]
- Parameter #1 [ <optional> $startTime ]
- Parameter #2 [ <optional> $step ]
+ Parameter #1 [ <optional> $startTime = <default> ]
+ Parameter #2 [ <optional> $step = <default> ]
}
}
@@ -208,7 +208,7 @@ Extension [ <persistent> extension #120 rrd version 2.0.3 ] {
- Parameters [2] {
Parameter #0 [ <required> $values ]
- Parameter #1 [ <optional> $time ]
+ Parameter #1 [ <optional> $time = <default> ]
}
}
}
diff --git a/php-pecl-rrd.spec b/php-pecl-rrd.spec
index dd4106e..0546068 100644
--- a/php-pecl-rrd.spec
+++ b/php-pecl-rrd.spec
@@ -3,28 +3,29 @@
#
# Fedora spec file for php-pecl-rrd
#
-# Copyright (c) 2011-2021 Remi Collet
-# License: CC-BY-SA
+# Copyright (c) 2011-2023 Remi Collet
+# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-# we don't want -z defs linker flag
-%undefine _strict_symbol_defs_build
-
%{?scl: %scl_package php-pecl-rrd}
-%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%global pecl_name rrd
-%global ini_name 40-%{pecl_name}.ini
-#global prever beta3
+%bcond_without tests
+
+%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
+%global pecl_name rrd
+%global ini_name 40-%{pecl_name}.ini
+#global prever beta3
+%global sources %{pecl_name}-%{version}
+%global _configure ../%{sources}/configure
Summary: PHP Bindings for rrdtool
Name: %{?scl_prefix}php-pecl-rrd
Version: 2.0.3
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
-License: BSD
+Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+License: BSD-2-Clause
URL: https://pecl.php.net/package/rrd
Source: https://pecl.php.net/get/%{pecl_name}-%{version}%{?prever}.tgz
@@ -45,26 +46,10 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version}
Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
-%if "%{?scl_prefix}" != "%{?sub_prefix}"
-Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
-Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%endif
-%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7
# Other third party repo stuff
Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.0"
-Obsoletes: php80-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "8.1"
-Obsoletes: php81-pecl-%{pecl_name} <= %{version}
-%endif
%endif
@@ -78,14 +63,12 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
%setup -c -q
-mv %{pecl_name}-%{version}%{?prever} NTS
-
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
-cd NTS
+cd %{sources}
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RRD_VERSION/{s/.* "//;s/".*$//;p}' php_rrd.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
@@ -99,23 +82,25 @@ cat > %{ini_name} << 'EOF'
extension=%{pecl_name}.so
EOF
+mkdir NTS
%if %{with_zts}
-cp -r NTS ZTS
+mkdir ZTS
%endif
%build
%{?dtsenable}
-cd NTS
-%{_bindir}/phpize
-%configure --with-php-config=%{_bindir}/php-config
+cd %{sources}
+%{__phpize}
+
+cd ../NTS
+%configure --with-php-config=%{__phpconfig}
make %{?_smp_mflags}
%if %{with_zts}
cd ../ZTS
-%{_bindir}/zts-phpize
-%configure --with-php-config=%{_bindir}/zts-php-config
+%configure --with-php-config=%{__ztsphpconfig}
make %{?_smp_mflags}
%endif
@@ -138,7 +123,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
# 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
+do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -153,8 +138,8 @@ done
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
-
-cd NTS
+%if %{with tests}
+cd %{sources}
if pkg-config librrd --atleast-version=1.5.0
then
: ignore test failed with rrdtool gt 1.5
@@ -166,16 +151,17 @@ then
rm tests/rrd_{012,017}.phpt
fi
+cp ../NTS/tests/data/Makefile tests/data
+cp ../NTS/tests/rrdtool-bin.inc tests
make -C tests/data clean
make -C tests/data all
: upstream test suite for NTS extension
-TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
+TEST_PHP_EXECUTABLE=%{__php} \
+TEST_PHP_ARGS="-n -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
-%{_bindir}/php -n \
- run-tests.php --show-diff
+%{__php} -n run-tests.php -q --show-diff
+%endif
%if 0%{?fedora} < 24 && 0%{?rhel} < 8
@@ -200,7 +186,7 @@ fi
%files
%doc %{pecl_docdir}/%{pecl_name}
-%{?_licensedir:%license NTS/LICENSE}
+%{?_licensedir:%license %{sources}/LICENSE}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -213,6 +199,9 @@ fi
%changelog
+* Wed Jul 19 2023 Remi Collet <remi@remirepo.net> - 2.0.3-3
+- build out of sources tree
+
* Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 2.0.3-2
- rebuild for 8.1.0RC1