You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
338 lines
10 KiB
338 lines
10 KiB
3 years ago
|
# remirepo/fedora spec file for php-pecl-rrd
|
||
|
#
|
||
|
# Copyright (c) 2011-2021 Remi Collet
|
||
|
# License: CC-BY-SA
|
||
|
# 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
|
||
|
|
||
|
%global with_zts 0%{?__ztsphp:1}
|
||
|
%global pecl_name rrd
|
||
|
%global ini_name 40-%{pecl_name}.ini
|
||
|
|
||
|
Summary: PHP Bindings for rrdtool
|
||
|
Name: php-pecl-rrd
|
||
|
Version: 2.0.3
|
||
|
Release: 3%{?dist}
|
||
|
License: BSD
|
||
|
URL: https://pecl.php.net/package/rrd
|
||
|
|
||
|
Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
|
||
|
|
||
|
BuildRequires: make
|
||
|
BuildRequires: gcc
|
||
|
BuildRequires: php-devel >= 7.0
|
||
|
BuildRequires: rrdtool
|
||
|
BuildRequires: pkgconfig(librrd) >= 1.3.0
|
||
|
BuildRequires: php-pear
|
||
|
|
||
|
Requires: php(zend-abi) = %{php_zend_api}
|
||
|
Requires: php(api) = %{php_core_api}
|
||
|
|
||
|
Conflicts: rrdtool-php
|
||
|
Provides: php-pecl(%{pecl_name}) = %{version}
|
||
|
Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}
|
||
|
Provides: php-%{pecl_name} = %{version}%{?pre}
|
||
|
Provides: php-%{pecl_name}%{?_isa} = %{version}%{?pre}
|
||
|
|
||
|
|
||
|
%description
|
||
|
Procedural and simple OO wrapper for rrdtool - data logging and graphing
|
||
|
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
|
||
|
# 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
|
||
|
: Error: Upstream extension version is ${extver}, expecting %{version}%{?prever}.
|
||
|
exit 1
|
||
|
fi
|
||
|
cd ..
|
||
|
|
||
|
cat > %{ini_name} << 'EOF'
|
||
|
; Enable %{pecl_name} extension module
|
||
|
extension=%{pecl_name}.so
|
||
|
EOF
|
||
|
|
||
|
%if %{with_zts}
|
||
|
cp -r NTS ZTS
|
||
|
%endif
|
||
|
|
||
|
|
||
|
%build
|
||
|
cd NTS
|
||
|
%{_bindir}/phpize
|
||
|
%configure --with-php-config=%{_bindir}/php-config
|
||
|
make %{?_smp_mflags}
|
||
|
|
||
|
%if %{with_zts}
|
||
|
cd ../ZTS
|
||
|
%{_bindir}/zts-phpize
|
||
|
%configure --with-php-config=%{_bindir}/zts-php-config
|
||
|
make %{?_smp_mflags}
|
||
|
%endif
|
||
|
|
||
|
|
||
|
%install
|
||
|
make install -C NTS INSTALL_ROOT=%{buildroot}
|
||
|
|
||
|
# Drop in the bit of configuration
|
||
|
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_ROOT=%{buildroot}
|
||
|
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
|
||
|
done
|
||
|
|
||
|
|
||
|
%check
|
||
|
%if %{with_zts}
|
||
|
%{__ztsphp} --no-php-ini \
|
||
|
--define extension=ZTS/modules/%{pecl_name}.so \
|
||
|
--modules | grep %{pecl_name}
|
||
|
%endif
|
||
|
|
||
|
cd NTS
|
||
|
%{__php} --no-php-ini \
|
||
|
--define extension=modules/%{pecl_name}.so \
|
||
|
--modules | grep %{pecl_name}
|
||
|
|
||
|
# See https://bugzilla.redhat.com/1224530 - segfault on ARM
|
||
|
%ifnarch %{arm}
|
||
|
if pkg-config librrd --atleast-version=1.5.0
|
||
|
then
|
||
|
: ignore test failed with rrdtool > 1.5
|
||
|
rm tests/rrd_{016,017}.phpt
|
||
|
fi
|
||
|
if ! pkg-config librrd --atleast-version=1.4.0
|
||
|
then
|
||
|
: ignore test failed with rrdtool < 1.4
|
||
|
rm tests/rrd_{012,017}.phpt
|
||
|
fi
|
||
|
|
||
|
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 \
|
||
|
REPORT_EXIT_STATUS=1 \
|
||
|
%{_bindir}/php -n run-tests.php --show-diff
|
||
|
%endif
|
||
|
|
||
|
|
||
|
%files
|
||
|
%license NTS/LICENSE
|
||
|
%doc %{pecl_docdir}/%{pecl_name}
|
||
|
%{pecl_xmldir}/%{name}.xml
|
||
|
|
||
|
%config(noreplace) %{php_inidir}/%{ini_name}
|
||
|
%{php_extdir}/%{pecl_name}.so
|
||
|
|
||
|
%if %{with_zts}
|
||
|
%config(noreplace) %{php_ztsinidir}/%{ini_name}
|
||
|
%{php_ztsextdir}/%{pecl_name}.so
|
||
|
%endif
|
||
|
|
||
|
|
||
|
%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 Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 2.0.3-2
|
||
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||
|
Related: rhbz#1971065
|
||
|
|
||
|
* Wed Apr 28 2021 Remi Collet <remi@remirepo.net> - 2.0.3-1
|
||
|
- update to 2.0.3
|
||
|
|
||
|
* 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
|
||
|
|
||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-16
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||
|
|
||
|
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-15
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||
|
|
||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-14
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||
|
|
||
|
* Thu Oct 03 2019 Remi Collet <remi@remirepo.net> - 2.0.1-13
|
||
|
- rebuild for https://fedoraproject.org/wiki/Changes/php74
|
||
|
|
||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-12
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||
|
|
||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-11
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||
|
|
||
|
* Thu Oct 11 2018 Remi Collet <remi@remirepo.net> - 2.0.1-10
|
||
|
- Rebuild for https://fedoraproject.org/wiki/Changes/php73
|
||
|
|
||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-9
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||
|
|
||
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-8
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||
|
|
||
|
* Mon Jan 29 2018 Remi Collet <remi@remirepo.net> - 2.0.1-7
|
||
|
- undefine _strict_symbol_defs_build
|
||
|
|
||
|
* Tue Oct 03 2017 Remi Collet <remi@fedoraproject.org> - 2.0.1-6
|
||
|
- rebuild for https://fedoraproject.org/wiki/Changes/php72
|
||
|
|
||
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-5
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||
|
|
||
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-4
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||
|
|
||
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-3
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||
|
|
||
|
* Mon Nov 14 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-2
|
||
|
- rebuild for https://fedoraproject.org/wiki/Changes/php71
|
||
|
|
||
|
* Mon Jun 27 2016 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
|
||
|
- update to 2.0.1
|
||
|
|
||
|
* Thu Apr 28 2016 Remi Collet <remi@fedoraproject.org> - 1.1.3-10
|
||
|
- rebuild for new rrdtool
|
||
|
- fix license management
|
||
|
- don't provide the test suite
|
||
|
|
||
|
* Sat Feb 13 2016 Remi Collet <remi@fedoraproject.org> - 1.1.3-9
|
||
|
- drop scriptlets (replaced by file triggers in php-pear)
|
||
|
- cleanup
|
||
|
|
||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-8
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||
|
|
||
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-7
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||
|
|
||
|
* Sun May 24 2015 Remi Collet <remi@fedoraproject.org> - 1.1.3-6
|
||
|
- ignore failed tests with rrdtool 1.5
|
||
|
FTBFS detected by Koschei, reported upstream
|
||
|
- skip test suite on arm
|
||
|
|
||
|
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-5
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||
|
|
||
|
* Thu Jun 19 2014 Remi Collet <rcollet@redhat.com> - 1.1.3-4
|
||
|
- rebuild for https://fedoraproject.org/wiki/Changes/Php56
|
||
|
|
||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3-3
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||
|
|
||
|
* Thu Apr 24 2014 Remi Collet <rcollet@redhat.com> - 1.1.3-2
|
||
|
- add numerical prefix to extension configuration file
|
||
|
|
||
|
* Wed Jan 15 2014 Remi Collet <remi@fedoraproject.org> - 1.1.3-1
|
||
|
- Update to 1.1.3 (stable)
|
||
|
- drop merged patch
|
||
|
|
||
|
* Tue Jan 14 2014 Remi Collet <remi@fedoraproject.org> - 1.1.2-1
|
||
|
- Update to 1.1.2 (stable)
|
||
|
- install doc in pecl doc_dir
|
||
|
- install tests in pecl test_dir
|
||
|
- add conditional build of ZTS extension
|
||
|
|
||
|
* Mon Sep 09 2013 Remi Collet <remi@fedoraproject.org> - 1.1.1-2
|
||
|
- patch for build warning
|
||
|
- patch to fix test result with recent rrdtool
|
||
|
|
||
|
* Mon Sep 09 2013 Remi Collet <remi@fedoraproject.org> - 1.1.1-1
|
||
|
- Update to 1.1.1
|
||
|
|
||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-4
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||
|
|
||
|
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 1.1.0-3
|
||
|
- rebuild for http://fedoraproject.org/wiki/Features/Php55
|
||
|
|
||
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-2
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||
|
|
||
|
* Sun Aug 12 2012 Remi Collet <remi@fedoraproject.org> - 1.1.0-1
|
||
|
- Version 1.1.0 (stable), api 1.1.0 (stable)
|
||
|
|
||
|
* Tue Jul 31 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-4
|
||
|
- ignore test results (fails with rrdtool 1.4.7)
|
||
|
|
||
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||
|
|
||
|
* Thu Jan 19 2012 Remi Collet <remi@fedoraproject.org> - 1.0.5-3
|
||
|
- build against php 5.4
|
||
|
|
||
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-2
|
||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||
|
|
||
|
* Fri Nov 18 2011 Remi Collet <remi@fedoraproject.org> 1.0.5-1
|
||
|
- update to 1.0.5
|
||
|
- change license from PHP to BSD
|
||
|
|
||
|
* Tue Aug 16 2011 Remi Collet <Fedora@FamilleCollet.com> 1.0.4-1
|
||
|
- Version 1.0.4 (stable) - API 1.0.4 (stable)
|
||
|
- fix filters
|
||
|
|
||
|
* Fri Apr 29 2011 Remi Collet <Fedora@FamilleCollet.com> 1.0.3-1
|
||
|
- Version 1.0.3 (stable) - API 1.0.3 (stable)
|
||
|
- no change in sources
|
||
|
|
||
|
* Wed Apr 20 2011 Remi Collet <Fedora@FamilleCollet.com> 1.0.2-1
|
||
|
- Version 1.0.2 (stable) - API 1.0.2 (stable)
|
||
|
- no change in sources
|
||
|
|
||
|
* Sat Apr 16 2011 Remi Collet <Fedora@FamilleCollet.com> 1.0.1-1
|
||
|
- Version 1.0.1 (stable) - API 1.0.1 (stable)
|
||
|
- no change in sources
|
||
|
- remove generated Changelog (only latest version, no real value)
|
||
|
|
||
|
* Tue Apr 12 2011 Remi Collet <Fedora@FamilleCollet.com> 1.0.0-1
|
||
|
- Version 1.0.0 (stable) - API 1.0.0 (stable)
|
||
|
- remove all patches merged by upstream
|
||
|
|
||
|
* Sat Mar 05 2011 Remi Collet <Fedora@FamilleCollet.com> 0.10.0-2
|
||
|
- improved patches
|
||
|
- implement rrd_strversion
|
||
|
|
||
|
* Fri Mar 04 2011 Remi Collet <Fedora@FamilleCollet.com> 0.10.0-1
|
||
|
- Version 0.10.0 (stable) - API 0.10.0 (beta)
|
||
|
- remove patches, merged upstream
|
||
|
- add links to 5 new upstream bugs
|
||
|
|
||
|
* Mon Jan 03 2011 Remi Collet <Fedora@FamilleCollet.com> 0.9.0-1
|
||
|
- Version 0.9.0 (beta) - API 0.9.0 (beta)
|
||
|
- initial RPM
|
||
|
|