summaryrefslogtreecommitdiffstats
path: root/php-pecl-ip2location.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-25 09:07:44 +0200
committerRemi Collet <remi@remirepo.net>2020-09-25 09:07:44 +0200
commit13fdad5a9730d2f1e1025ac08efe7e3e638e3339 (patch)
tree77b8a4ad56482a47028aeb1e62bb6208fcd83e04 /php-pecl-ip2location.spec
parent9b4eb742b5ed52f7257329fd37946f69f64dc919 (diff)
add patches for library version 8.1 and for PHP 8 from
https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11
Diffstat (limited to 'php-pecl-ip2location.spec')
-rw-r--r--php-pecl-ip2location.spec39
1 files changed, 29 insertions, 10 deletions
diff --git a/php-pecl-ip2location.spec b/php-pecl-ip2location.spec
index 8c955a1..d0d55fc 100644
--- a/php-pecl-ip2location.spec
+++ b/php-pecl-ip2location.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-ip2location
#
-# Copyright (c) 2020 Remi Collet
+# Copyright (c) 2017-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -16,7 +16,7 @@
%if "%{php_version}" < "5.6"
%global ini_name %{pecl_name}.ini
%else
-%global ini_name 40-%{pecl_name}.ini
+%global ini_name 40-%{pecl_name}.ini
%endif
%global upstream_version 8.0.1
@@ -24,20 +24,27 @@
Summary: Get geo location information of an IP address
Name: %{?sub_prefix}php-pecl-%{pecl_name}
+License: PHP
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 6%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
URL: https://pecl.php.net/package/igbinary
Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz
-License: PHP
-Group: System Environment/Libraries
-# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/5
+# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/5 - test suite
Patch0: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/5.patch
+# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8 - library 8.1
+Patch1: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/8.patch
+# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9 - PHP 8
+Patch2: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/9.patch
+# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10 - display version
+Patch3: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/10.patch
+# https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11 - config.m4
+Patch4: https://patch-diff.githubusercontent.com/raw/chrislim2888/IP2Location-PECL-Extension/pull/11.patch
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-pear
BuildRequires: %{?scl_prefix}php-devel
-BuildRequires: IP2location-devel
+BuildRequires: IP2Location-devel
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
@@ -96,7 +103,12 @@ sed -e 's/role="test"/role="src"/' \
cd NTS
chmod -x *.c *.h LICENSE README
mv test tests
-%patch0 -p1 -b .pr10
+sed -e "s/\r//" -i *.c config.m4
+%patch0 -p1 -b .pr5
+%patch1 -p1 -b .pr8
+%patch2 -p1 -b .pr9
+%patch3 -p1 -b .pr10
+%patch4 -p1 -b .pr11
# Check version
extver=$(sed -n '/#define PHP_IP2LOCATION_VERSION/{s/.* "//;s/".*$//;p}' php_ip2location.h)
@@ -154,7 +166,7 @@ done
%check
-: simple NTS module load test, without APC, as optional
+: simple NTS module load test
%{_bindir}/php --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
@@ -168,7 +180,7 @@ REPORT_EXIT_STATUS=1 \
%{_bindir}/php -n run-tests.php --show-diff
%if %{with_zts}
-: simple ZTS module load test, without APC, as optional
+: simple ZTS module load test
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
@@ -219,6 +231,13 @@ fi
%changelog
+* Fri Sep 25 2020 Remi Collet <remi@remirepo.net> - 8.0.1-6
+- add patches for library version 8.1 and for PHP 8 from
+ https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8
+ https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9
+ https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10
+ https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 8.0.1-5
- rebuild for 7.4.0RC1