summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-02-04 10:19:11 +0100
committerRemi Collet <remi@php.net>2025-02-04 10:19:11 +0100
commitb357a03b99fdc5d76e8ab810389def098cb47c83 (patch)
treef75604836bc3556c01fe453974c5e76d48f7883e
parent6dd8f82a7f34a59ba3773a4afec69cb440598205 (diff)
re-license spec file to CECILL-2.1
update bundled libip2proxy to 4.2.1
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-ip2proxy.spec68
3 files changed, 27 insertions, 45 deletions
diff --git a/PHPINFO b/PHPINFO
index 6a73339..e909c9c 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -3,4 +3,4 @@ ip2proxy
ip2proxy support => enabled
extension version => 3.0.3
-library version => 4.1.2
+library version => 4.2.0
diff --git a/REFLECTION b/REFLECTION
index cde19be..24eb13e 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #125 ip2proxy version 3.0.3 ] {
+Extension [ <persistent> extension #85 ip2proxy version 3.0.3 ] {
- Constants [4] {
Constant [ int IP2PROXY_FILE_IO ] { 0 }
diff --git a/php-pecl-ip2proxy.spec b/php-pecl-ip2proxy.spec
index 6064acd..7b5e40a 100644
--- a/php-pecl-ip2proxy.spec
+++ b/php-pecl-ip2proxy.spec
@@ -1,8 +1,8 @@
# remirepo spec file for php-pecl-ip2proxy
#
-# Copyright (c) 2020-2023 Remi Collet
-# License: CC-BY-SA-4.0
-# http://creativecommons.org/licenses/by-sa/4.0/
+# SPDX-FileCopyrightText: Copyright 2020-2025 Remi Collet
+# SPDX-License-Identifier: CECILL-2.1
+# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
#
# Please, preserve the changelog entries
#
@@ -11,19 +11,9 @@
%bcond_without tests
-# For PHP < 5.6 and EPEL-9
-%{!?__phpize: %global __phpize %{_bindir}/phpize}
-%{!?__ztsphpize: %global __ztsphpize %{_bindir}/zts-phpize}
-%{!?__phpconfig: %global __phpconfig %{_bindir}/php-config}
-%{!?__ztsphpconfig:%global __ztsphpconfig %{_bindir}/zts-php-config}
-
%global pecl_name ip2proxy
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
-%if "%{php_version}" < "5.6"
-%global ini_name %{pecl_name}.ini
-%else
%global ini_name 40-%{pecl_name}.ini
-%endif
%global upstream_version 3.0.3
#global upstream_prever RC1
%global sources %{pecl_name}-%{upstream_version}%{?upstream_prever}
@@ -32,8 +22,8 @@
# see https://github.com/ip2location/ip2proxy-c/commits/master
%global gh_owner ip2location
%global gh_project ip2proxy-c
-%global gh_commit 15a7cb4d856d3c1016ad0494124a8822d6a33d42
-%global gh_version 4.1.2
+%global gh_commit 75beea905bd25fdba9d8fb965f958ba3c9c552f7
+%global gh_version 4.2.0
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
Summary: Get proxy information of an IP address
@@ -41,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: 3%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 5%{?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
@@ -76,13 +66,15 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%setup -q -c -a 1
mv %{gh_project}-%{gh_commit}/libIP2Proxy libIP2Proxy
mv %{gh_project}-%{gh_commit}/LICENSE.TXT LICENSE-%{gh_project}
+sed -e 's:../config.h:config.h:' -i libIP2Proxy/IP2Proxy.c
# Don't install tests
sed -e 's/role="test"/role="src"/' \
- %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
+ -e '/LICENSE/s/role="doc"/role="src"/' \
-e '/README.TXT/s/role="doc"/role="src"/' \
-i package.xml
+
cd %{sources}
%patch -P0 -p1 -b .rpm
@@ -110,26 +102,30 @@ EOF
cd %{sources}
%{__phpize}
+[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global
+sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL
cd ../NTS
%configure \
--with-ip2proxy=../libIP2Proxy \
--with-php-config=%{__phpconfig}
-make %{?_smp_mflags}
+
+%make_build
%if %{with_zts}
cd ../ZTS
%configure \
--with-ip2proxy=../libIP2Proxy \
--with-php-config=%{__ztsphpconfig}
-make %{?_smp_mflags}
+
+%make_build
%endif
%install
%{?dtsenable}
-make install -C NTS INSTALL_ROOT=%{buildroot}
+%make_install -C NTS
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
@@ -137,7 +133,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
# Install the ZTS stuff
%if %{with_zts}
-make install -C ZTS INSTALL_ROOT=%{buildroot}
+%make_install -C ZTS
install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
@@ -179,30 +175,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
-%{!?_licensedir:%global license %%doc}
%license LICENSE-%{gh_project}
-%{?_licensedir:%license %{sources}/LICENSE}
+%license %{sources}/LICENSE
%doc %{pecl_docdir}/%{pecl_name}
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -216,6 +191,13 @@ fi
%changelog
+* 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
+
+* Tue Oct 1 2024 Remi Collet <remi@remirepo.net> - 3.0.3-4
+- cleanup spec
+
* Fri Sep 1 2023 Remi Collet <remi@remirepo.net> - 3.0.3-3
- update bundled libip2proxy to 4.1.2