summaryrefslogtreecommitdiffstats
path: root/php-pecl-varnish.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-varnish.spec')
-rw-r--r--php-pecl-varnish.spec50
1 files changed, 20 insertions, 30 deletions
diff --git a/php-pecl-varnish.spec b/php-pecl-varnish.spec
index 9dec7b5..d81e1fa 100644
--- a/php-pecl-varnish.spec
+++ b/php-pecl-varnish.spec
@@ -1,12 +1,14 @@
# remirepo spec file for php-pecl-varnish
#
-# Copyright (c) 2013-2018 Remi Collet
+# Copyright (c) 2013-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
+%bcond_with tests
+
# we don't want -z defs linker flag
%undefine _strict_symbol_defs_build
@@ -19,7 +21,6 @@
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global pecl_name varnish
-%global with_tests %{?_with_tests:1}%{!?_with_tests:0}
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
@@ -29,10 +30,12 @@
Summary: Varnish Cache bindings
Name: %{?sub_prefix}php-pecl-%{pecl_name}
Version: 1.2.4
-Release: 4%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 5%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: BSD
-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
+
+Patch0: %{pecl_name}-php8.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -40,7 +43,7 @@ BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-hash
BuildRequires: varnish-libs-devel > 3
# For tests
-%if %{with_tests}
+%if %{with tests}
BuildRequires: varnish
%endif
@@ -57,38 +60,20 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{rele
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
%endif
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.0"
-Obsoletes: php70u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
-%endif
-%if "%{php_version}" > "7.1"
-Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
-%endif
%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}
+Obsoletes: php73-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
-Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+Obsoletes: php74-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
-
-%if 0%{?fedora} < 20 && 0%{?rhel} < 7
-# Filter shared private
-%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
-%{?filter_setup}
%endif
@@ -111,6 +96,8 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p3 -b .up0
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_VARNISH_VERSION/{s/.* "//;s/".*$//;p}' php_varnish.h)
if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then
@@ -208,7 +195,7 @@ ret=0
--modules | grep %{pecl_name}
%endif
-%if %{with_tests}
+%if %{with tests}
cd NTS
: Run a varnish server for test suite
@@ -289,6 +276,9 @@ exit $ret
%changelog
+* Mon Aug 24 2020 Remi Collet <remi@remirepo.net> - 1.2.4-5
+- add upstream patch for PHP 8
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.2.4-4
- rebuild for 7.4.0RC1