summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-02-06 07:09:21 +0100
committerRemi Collet <remi@php.net>2025-02-06 07:09:21 +0100
commitd26891c0080f222d462295c9379cde5e43a2d178 (patch)
tree6b75409fcf9604a32c84886a4029f9bd57afff39
parentb357a03b99fdc5d76e8ab810389def098cb47c83 (diff)
update to 3.1.0
fix build using patch from https://github.com/ip2location/ip2proxy-pecl/pull/6 version removed from pecl
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION8
-rw-r--r--ip2proxy-build.patch22
-rw-r--r--php-pecl-ip2proxy.spec30
4 files changed, 48 insertions, 14 deletions
diff --git a/PHPINFO b/PHPINFO
index e909c9c..79e4af8 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,5 +2,5 @@
ip2proxy
ip2proxy support => enabled
-extension version => 3.0.3
+extension version => 3.1.0
library version => 4.2.0
diff --git a/REFLECTION b/REFLECTION
index 24eb13e..90b1e2a 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #85 ip2proxy version 3.0.3 ] {
+Extension [ <persistent> extension #85 ip2proxy version 3.1.0 ] {
- Constants [4] {
Constant [ int IP2PROXY_FILE_IO ] { 0 }
@@ -92,6 +92,12 @@ Extension [ <persistent> extension #85 ip2proxy version 3.0.3 ] {
Parameter #0 [ <required> $ip_address ]
}
}
+ Function [ <internal:ip2proxy> function ip2proxy_get_fraud_score ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <required> $ip_address ]
+ }
+ }
Function [ <internal:ip2proxy> function ip2proxy_get_all ] {
- Parameters [1] {
diff --git a/ip2proxy-build.patch b/ip2proxy-build.patch
new file mode 100644
index 0000000..d38922e
--- /dev/null
+++ b/ip2proxy-build.patch
@@ -0,0 +1,22 @@
+From 4b1ed2a22748f4adb7a5e30df9284147601ccd66 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 6 Feb 2025 06:44:46 +0100
+Subject: [PATCH] missing brackets
+
+---
+ ip2proxy.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ip2proxy.c b/ip2proxy.c
+index 0914c00..622f7ee 100644
+--- a/ip2proxy.c
++++ b/ip2proxy.c
+@@ -47,7 +47,7 @@ static zend_function_entry ip2proxy_functions_entry[] = {
+ PHP_FE(ip2proxy_get_last_seen, ip2proxy_ip_address)
+ PHP_FE(ip2proxy_get_threat, ip2proxy_ip_address)
+ PHP_FE(ip2proxy_get_provider, ip2proxy_ip_address)
+- PHP_FE(ip2proxy_get_fraud_score, ip2proxy_ip_address
++ PHP_FE(ip2proxy_get_fraud_score, ip2proxy_ip_address)
+ PHP_FE(ip2proxy_get_all, ip2proxy_ip_address)
+ PHP_FE(ip2proxy_close, ip2proxy_void)
+ PHP_FE(ip2proxy_delete_shm, ip2proxy_void)
diff --git a/php-pecl-ip2proxy.spec b/php-pecl-ip2proxy.spec
index 7b5e40a..e49e8f3 100644
--- a/php-pecl-ip2proxy.spec
+++ b/php-pecl-ip2proxy.spec
@@ -14,7 +14,7 @@
%global pecl_name ip2proxy
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
-%global upstream_version 3.0.3
+%global upstream_version 3.1.0
#global upstream_prever RC1
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
@@ -31,7 +31,7 @@ Name: %{?scl_prefix}php-pecl-%{pecl_name}
# library is MIT, extension is PHP
License: MIT and PHP-3.01
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 5%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
URL: https://pecl.php.net/package/igbinary
Source0: https://pecl.php.net/get/%{sources}.tgz
@@ -40,6 +40,9 @@ Source1: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit
Patch0: %{pecl_name}-bundledlib.patch
Provides: bundled(%{gh_project}) = %{gh_version}
+# Fix build
+Patch1: %{pecl_name}-build.patch
+
BuildRequires: make
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-pear
@@ -56,8 +59,8 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%description
This PECL extension allows you to detect proxy servers with country,
-region, city, ISP, domain, usage type, ASN, security threat and proxy
-type information using IP2Proxy binary database.
+region, city, ISP, domain, usage type, ASN, security threat, proxy type,
+provider and fraud score information using IP2Proxy binary database.
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -77,6 +80,7 @@ sed -e 's/role="test"/role="src"/' \
cd %{sources}
%patch -P0 -p1 -b .rpm
+%patch -P1 -p1 -b .pr6
# Check version
extver=$(sed -n '/#define PHP_IP2PROXY_VERSION/{s/.* "//;s/".*$//;p}' php_ip2proxy.h)
@@ -152,6 +156,10 @@ cd %{sources}
--modules | grep %{pecl_name}
%if %{with tests}
+: Fix test suite
+sed -e 's/string(2) "US"/string(1) "-"/;s/string(24) "United States of America"/string(1) "-"/' \
+ -i tests/*phpt
+
: upstream test suite
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
@@ -164,14 +172,6 @@ REPORT_EXIT_STATUS=1 \
%{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
-
-%if %{with tests}
-: upstream test suite
-TEST_PHP_EXECUTABLE=%{__ztsphp} \
-TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{__ztsphp} -n run-tests.php -q --show-diff
-%endif
%endif
@@ -191,6 +191,12 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Thu Feb 6 2025 Remi Collet <remi@remirepo.net> - 3.1.0-1
+- update to 3.1.0
+- fix build using patch
+ from https://github.com/ip2location/ip2proxy-pecl/pull/6
+- version removed from pecl
+
* Tue Feb 4 2025 Remi Collet <remi@remirepo.net> - 3.0.3-5
- re-license spec file to CECILL-2.1
- update bundled libip2proxy to 4.2.1