summaryrefslogtreecommitdiffstats
path: root/php-pecl-timecop.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-timecop.spec')
-rw-r--r--php-pecl-timecop.spec69
1 files changed, 15 insertions, 54 deletions
diff --git a/php-pecl-timecop.spec b/php-pecl-timecop.spec
index 280b6fd..aa5af66 100644
--- a/php-pecl-timecop.spec
+++ b/php-pecl-timecop.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-timecop
#
-# Copyright (c) 2017-2019 Remi Collet
+# Copyright (c) 2017-2024 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -25,10 +25,10 @@
Summary: Time travel and freezing extension
Name: %{?sub_prefix}php-pecl-timecop
Version: 1.2.10
-Release: 9%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: MIT
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
# https://github.com/hnw/php-timecop/pull/44 Support strict_types
Patch0: https://patch-diff.githubusercontent.com/raw/hnw/php-timecop/pull/44.patch
@@ -42,12 +42,12 @@ Patch5: https://github.com/hnw/php-timecop/commit/ab34c77a5a9c8611d1fc876
Patch6: https://github.com/hnw/php-timecop/commit/61748491a773a7f47694e2fd97dc2c3c61ce9f18.patch
BuildRequires: %{?dtsprefix}gcc
+BuildRequires: make
BuildRequires: %{?scl_prefix}php-devel
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}}
Obsoletes: %{?scl_prefix}php-%{pecl_name} < 1.2.7
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
@@ -59,28 +59,6 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{relea
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
-# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.3"
-Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
-%endif
-%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
-%endif
-
%description
A PHP extension providing "time travel" and "time freezing" capabilities,
@@ -95,17 +73,17 @@ mv %{pecl_name}-%{version} NTS
# Don't install/register tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-i package.xml
cd NTS
#patch0 -p1 -b .pr44
#patch1 -p1 -b .pr45
-%patch2 -p1 -b .up1
-%patch3 -p1 -b .up2
-%patch4 -p1 -b .up3
-%patch5 -p1 -b .up4
-%patch6 -p1 -b .up5
+%patch -P2 -p1 -b .up1
+%patch -P3 -p1 -b .up2
+%patch -P4 -p1 -b .up3
+%patch -P5 -p1 -b .up4
+%patch -P6 -p1 -b .up5
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_TIMECOP_VERSION/{s/.* "//;s/".*$//;p}' php_timecop.h)
@@ -213,29 +191,9 @@ REPORT_EXIT_STATUS=1 \
%endif
-%if 0%{?fedora} < 24 && 0%{?rhel} < 8
-# when pear installed alone, after us
-%triggerin -- %{?scl_prefix}php-pear
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-# posttrans as pear can be installed after us
-%posttrans
-if [ -x %{__pecl} ] ; then
- %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
-fi
-
-%postun
-if [ $1 -eq 0 -a -x %{__pecl} ] ; then
- %{pecl_uninstall} %{pecl_name} >/dev/null || :
-fi
-%endif
-
-
%files
%doc %{pecl_docdir}/%{pecl_name}
-%{?_licensedir:%license NTS/LICENSE}
+%license NTS/LICENSE
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -248,6 +206,9 @@ fi
%changelog
+* Tue Aug 27 2024 Remi Collet <remi@remirepo.net> - 1.2.10-10
+- cleanup
+
* Sun Dec 15 2019 Remi Collet <remi@remirepo.net> - 1.2.10-9
- add upstream patches for 7.3 and 7.4
- disable ZTS for now