|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
# remirepo/fedora spec file for php-pecl-rrd
|
|
|
|
|
#
|
|
|
|
|
# Copyright (c) 2011-2021 Remi Collet
|
|
|
|
|
# License: CC-BY-SA
|
|
|
|
|
# Copyright (c) 2011-2024 Remi Collet
|
|
|
|
|
# License: CC-BY-SA-4.0
|
|
|
|
|
# http://creativecommons.org/licenses/by-sa/4.0/
|
|
|
|
|
#
|
|
|
|
|
# Please, preserve the changelog entries
|
|
|
|
@ -13,15 +13,19 @@
|
|
|
|
|
%global with_zts 0%{?__ztsphp:1}
|
|
|
|
|
%global pecl_name rrd
|
|
|
|
|
%global ini_name 40-%{pecl_name}.ini
|
|
|
|
|
%global sources %{pecl_name}-%{version}
|
|
|
|
|
%global _configure ../%{sources}/configure
|
|
|
|
|
|
|
|
|
|
Summary: PHP Bindings for rrdtool
|
|
|
|
|
Name: php-pecl-rrd
|
|
|
|
|
Version: 2.0.3
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
License: BSD
|
|
|
|
|
Release: 15%{?dist}
|
|
|
|
|
License: BSD-2-Clause
|
|
|
|
|
URL: https://pecl.php.net/package/rrd
|
|
|
|
|
|
|
|
|
|
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
|
|
|
|
|
Source0: https://pecl.php.net/get/%{sources}.tgz
|
|
|
|
|
|
|
|
|
|
Patch0: %{pecl_name}-build.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
@ -48,14 +52,14 @@ system for time series data.
|
|
|
|
|
%prep
|
|
|
|
|
%setup -c -q
|
|
|
|
|
|
|
|
|
|
mv %{pecl_name}-%{version} NTS
|
|
|
|
|
|
|
|
|
|
# Don't install/register tests
|
|
|
|
|
sed -e 's/role="test"/role="src"/' \
|
|
|
|
|
-e '/LICENSE/s/role="doc"/role="src"/' \
|
|
|
|
|
-i package.xml
|
|
|
|
|
|
|
|
|
|
cd NTS
|
|
|
|
|
cd %{sources}
|
|
|
|
|
%patch -P0 -p1
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
@ -69,21 +73,27 @@ cat > %{ini_name} << 'EOF'
|
|
|
|
|
extension=%{pecl_name}.so
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
mkdir NTS
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
cp -r NTS ZTS
|
|
|
|
|
mkdir ZTS
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
cd NTS
|
|
|
|
|
%{_bindir}/phpize
|
|
|
|
|
%configure --with-php-config=%{_bindir}/php-config
|
|
|
|
|
# See https://bugzilla.redhat.com/2264827
|
|
|
|
|
# only "const" issues
|
|
|
|
|
export CFLAGS="%{optflags} -Wno-incompatible-pointer-types"
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
@ -104,24 +114,25 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%if %{with_zts}
|
|
|
|
|
%{__ztsphp} --no-php-ini \
|
|
|
|
|
--define extension=ZTS/modules/%{pecl_name}.so \
|
|
|
|
|
--modules | grep %{pecl_name}
|
|
|
|
|
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
|
|
|
|
|
--modules | grep '^%{pecl_name}$'
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
cd NTS
|
|
|
|
|
%{__php} --no-php-ini \
|
|
|
|
|
--define extension=modules/%{pecl_name}.so \
|
|
|
|
|
--modules | grep %{pecl_name}
|
|
|
|
|
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
|
|
|
|
|
--modules | grep '^%{pecl_name}$'
|
|
|
|
|
|
|
|
|
|
# See https://bugzilla.redhat.com/1224530 - segfault on ARM
|
|
|
|
|
%ifnarch %{arm}
|
|
|
|
|
%ifnarch %{arm} s390x
|
|
|
|
|
cd %{sources}
|
|
|
|
|
|
|
|
|
|
if pkg-config librrd --atleast-version=1.5.0
|
|
|
|
|
then
|
|
|
|
|
: ignore test failed with rrdtool > 1.5
|
|
|
|
@ -133,19 +144,20 @@ 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
|
|
|
|
|
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{_bindir}/php \
|
|
|
|
|
TEST_PHP_ARGS="-n -d extension_dir= -d extension=$PWD/modules/%{pecl_name}.so" \
|
|
|
|
|
NO_INTERACTION=1 \
|
|
|
|
|
TEST_PHP_EXECUTABLE=%{__php} \
|
|
|
|
|
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
|
|
|
|
|
REPORT_EXIT_STATUS=1 \
|
|
|
|
|
%{_bindir}/php -n run-tests.php --show-diff
|
|
|
|
|
%{__php} -n run-tests.php -q --show-diff
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license NTS/LICENSE
|
|
|
|
|
%license %{sources}/LICENSE
|
|
|
|
|
%doc %{pecl_docdir}/%{pecl_name}
|
|
|
|
|
%{pecl_xmldir}/%{name}.xml
|
|
|
|
|
|
|
|
|
@ -159,13 +171,53 @@ REPORT_EXIT_STATUS=1 \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-3
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 2.0.3-15
|
|
|
|
|
- Bump release for October 2024 mass rebuild:
|
|
|
|
|
Resolves: RHEL-64018
|
|
|
|
|
|
|
|
|
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 2.0.3-14
|
|
|
|
|
- Bump release for June 2024 mass rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Feb 19 2024 Remi Collet <remi@remirepo.net> - 2.0.3-13
|
|
|
|
|
- ignore incompatible-pointer-types see #2264827
|
|
|
|
|
|
|
|
|
|
* Mon Jan 29 2024 Remi Collet <remi@remirepo.net> - 2.0.3-12
|
|
|
|
|
- fix incompatible pointer types using patch from
|
|
|
|
|
https://github.com/php/pecl-processing-rrd/pull/4
|
|
|
|
|
- build out of sources tree
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-12
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-11
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Tue Oct 03 2023 Remi Collet <remi@remirepo.net> - 2.0.3-10
|
|
|
|
|
- rebuild for https://fedoraproject.org/wiki/Changes/php83
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Apr 20 2023 Remi Collet <remi@remirepo.net> - 2.0.3-8
|
|
|
|
|
- use SPDX license ID
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Oct 05 2022 Remi Collet <remi@remirepo.net> - 2.0.3-6
|
|
|
|
|
- rebuild for https://fedoraproject.org/wiki/Changes/php82
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-5
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Oct 28 2021 Remi Collet <remi@remirepo.net> - 2.0.3-3
|
|
|
|
|
- rebuild for https://fedoraproject.org/wiki/Changes/php81
|
|
|
|
|
|
|
|
|
|
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-2
|
|
|
|
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
|
|
|
|
Related: rhbz#1971065
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Wed Apr 28 2021 Remi Collet <remi@remirepo.net> - 2.0.3-1
|
|
|
|
|
- update to 2.0.3
|
|
|
|
@ -173,8 +225,9 @@ REPORT_EXIT_STATUS=1 \
|
|
|
|
|
* Mon Apr 19 2021 Remi Collet <remi@remirepo.net> - 2.0.2-1
|
|
|
|
|
- update to 2.0.2
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.1-17
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
* Fri Mar 5 2021 Remi Collet <remi@remirepo.net> - 2.0.1-17
|
|
|
|
|
- rebuild for https://fedoraproject.org/wiki/Changes/php80
|
|
|
|
|
- add upstream patch for PHP 8
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-16
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|