summaryrefslogtreecommitdiffstats
path: root/php-pecl-geoip.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-pecl-geoip.spec')
-rw-r--r--php-pecl-geoip.spec25
1 files changed, 17 insertions, 8 deletions
diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec
index a30991a..4d1bb5a 100644
--- a/php-pecl-geoip.spec
+++ b/php-pecl-geoip.spec
@@ -13,7 +13,7 @@
%scl_package php-pecl-geoip
%endif
-%define pecl_name geoip
+%global pecl_name geoip
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
@@ -24,11 +24,15 @@
Name: %{?sub_prefix}php-pecl-geoip
Version: 1.1.1
-Release: 11%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 14%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: Extension to map IP addresses to geographic places
License: PHP
-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
+
+# Upstream patch for PHP 8
+# https://svn.php.net/viewvc?view=revision&revision=351082
+Patch0: %{pecl_name}-php8.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: GeoIP-devel
@@ -48,12 +52,11 @@ 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
Obsoletes: php53-pecl-%{pecl_name} <= %{version}
Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
Obsoletes: php54-pecl-%{pecl_name} <= %{version}
-Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "5.5"
Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
@@ -76,11 +79,12 @@ 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
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -111,6 +115,8 @@ sed -e 's/role="test"/role="src"/' \
mv %{pecl_name}-%{version} NTS
cd NTS
+%patch0 -p3 -b .up
+
extver=$(sed -n '/#define PHP_GEOIP_VERSION/{s/.* "//;s/".*$//;p}' php_geoip.h)
if test "x${extver}" != "x%{version}"; then
: Error: Upstream version is ${extver}, expecting %{version}.
@@ -228,6 +234,9 @@ fi
%changelog
+* Fri Oct 30 2020 Remi Collet <remi@remirepo.net> - 1.1.1-14
+- add upstream patch for PHP 8
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.1.1-11
- rebuild for 7.4.0RC1