diff options
| -rw-r--r-- | REFLECTION | 91 | ||||
| -rw-r--r-- | php-pecl-geoip.spec | 83 | 
2 files changed, 130 insertions, 44 deletions
@@ -1,4 +1,4 @@ -Extension [ <persistent> extension #117 geoip version 1.1.1 ] { +Extension [ <persistent> extension #124 geoip version 1.1.1 ] {    - INI {      Entry [ geoip.custom_directory <ALL> ] @@ -27,48 +27,137 @@ Extension [ <persistent> extension #117 geoip version 1.1.1 ] {    - Functions {      Function [ <internal:geoip> function geoip_database_info ] { + +      - Parameters [1] { +        Parameter #0 [ <optional> $database = <default> ] +      }      }      Function [ <internal:geoip> function geoip_country_code_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_country_code3_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_country_name_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_country_code_by_name_v6 ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_country_code3_by_name_v6 ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_country_name_by_name_v6 ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_continent_code_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_org_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_record_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_id_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_region_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_isp_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_db_avail ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $database ] +      }      }      Function [ <internal:geoip> function geoip_db_get_all_info ] { + +      - Parameters [0] { +      }      }      Function [ <internal:geoip> function geoip_db_filename ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $database ] +      }      }      Function [ <internal:geoip> function geoip_region_name_by_code ] { + +      - Parameters [2] { +        Parameter #0 [ <required> $country_code ] +        Parameter #1 [ <required> $region_code ] +      }      }      Function [ <internal:geoip> function geoip_time_zone_by_country_and_region ] { + +      - Parameters [2] { +        Parameter #0 [ <required> $country_code ] +        Parameter #1 [ <required> $region_code ] +      }      }      Function [ <internal:geoip> function geoip_setup_custom_directory ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $directory ] +      }      }      Function [ <internal:geoip> function geoip_asnum_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_domain_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }      Function [ <internal:geoip> function geoip_netspeedcell_by_name ] { + +      - Parameters [1] { +        Parameter #0 [ <required> $host ] +      }      }    }  } diff --git a/php-pecl-geoip.spec b/php-pecl-geoip.spec index 0434afb..ee577ce 100644 --- a/php-pecl-geoip.spec +++ b/php-pecl-geoip.spec @@ -8,25 +8,31 @@  #  # Please, preserve the changelog entries  # -%if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package       php-pecl-geoip -%endif +%{?scl:%scl_package php-pecl-geoip} + +%bcond_without      tests -%global pecl_name  geoip -%global with_zts   0%{!?_without_zts:%{?__ztsphp:1}} +%global pecl_name   geoip +%global with_zts    0%{!?_without_zts:%{?__ztsphp:1}}  %if "%{php_version}" < "5.6" -%global ini_name  %{pecl_name}.ini +%global ini_name    %{pecl_name}.ini  %else -%global ini_name  40-%{pecl_name}.ini +%global ini_name    40-%{pecl_name}.ini  %endif +%global sources     %{pecl_name}-%{version} +%global _configure  ../%{sources}/configure +# 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} -Name:           %{?sub_prefix}php-pecl-geoip +Name:           %{?scl_prefix}php-pecl-geoip  Version:        1.1.1 -Release:        16%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release:        17%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  Summary:        Extension to map IP addresses to geographic places -License:        PHP +License:        PHP-3.01  URL:            https://pecl.php.net/package/%{pecl_name}  Source0:        https://pecl.php.net/get/%{pecl_name}-%{version}.tgz @@ -48,12 +54,8 @@ Provides:       %{?scl_prefix}php-%{pecl_name}               = %{version}  Provides:       %{?scl_prefix}php-%{pecl_name}%{?_isa}       = %{version}  Provides:       %{?scl_prefix}php-pecl(%{pecl_name})         = %{version}  Provides:       %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides:       %{?scl_prefix}php-pecl-%{pecl_name}          = %{version}-%{release} -Provides:       %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa}  = %{version}-%{release} -%endif -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} == 7  # Other third party repo stuff  Obsoletes:     php53-pecl-%{pecl_name}  <= %{version}  Obsoletes:     php53u-pecl-%{pecl_name} <= %{version} @@ -81,15 +83,6 @@ Obsoletes:     php72w-pecl-%{pecl_name} <= %{version}  %if "%{php_version}" > "7.3"  Obsoletes:      php73-pecl-%{pecl_name} <= %{version}  %endif -%if "%{php_version}" > "7.4" -Obsoletes:      php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes:      php80-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.1" -Obsoletes:      php81-pecl-%{pecl_name} <= %{version} -%endif  %endif @@ -110,11 +103,9 @@ sed -e 's/role="test"/role="src"/' \      %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \      -i package.xml -mv %{pecl_name}-%{version} NTS - -cd NTS -%patch0 -p1 -b .php8 -%patch1 -p1 -b .php81 +cd %{sources} +%patch -P0 -p1 -b .php8 +%patch -P1 -p1 -b .php81  extver=$(sed -n '/#define PHP_GEOIP_VERSION/{s/.* "//;s/".*$//;p}' php_geoip.h)  if test "x${extver}" != "x%{version}"; then @@ -128,23 +119,25 @@ cat > %{ini_name} << 'EOF'  extension=%{pecl_name}.so  EOF +mkdir NTS  %if %{with_zts} -cp -pr NTS ZTS +mkdir ZTS  %endif  %build  %{?dtsenable} -cd NTS -%{_bindir}/phpize -%configure  --with-php-config=%{_bindir}/php-config +cd %{sources} +%{__phpize} + +cd ../NTS +%configure  --with-php-config=%{__phpconfig}  make %{?_smp_mflags}  %if %{with_zts}  cd ../ZTS -%{_bindir}/zts-phpize -%configure  --with-php-config=%{_bindir}/zts-php-config +%configure  --with-php-config=%{__ztsphpconfig}  make %{?_smp_mflags}  %endif @@ -167,7 +160,7 @@ install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}  # Documentation  for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//') -do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +do install -Dpm 644 %{sources}/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i  done @@ -175,16 +168,17 @@ done  : Minimal load test for NTS extension  %{__php} -n \      -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ -    -m | grep %{pecl_name} +    -m | grep '^%{pecl_name}$'  %if %{with_zts}  : Minimal load test for ZTS extension  %{__ztsphp} -n \      -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ -    -m | grep %{pecl_name} +    -m | grep '^%{pecl_name}$'  %endif -cd NTS +%if %{with tests} +cd %{sources}  # Missing IPv6 data  rm tests/019.phpt @@ -193,9 +187,9 @@ REPORT_EXIT_STATUS=1 \  NO_INTERACTION=1 \  %{__php} run-tests.php \      -n -q \ -    -d extension_dir=modules \ -    -d extension=%{pecl_name}.so \ +    -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \      --show-diff +%endif  %if 0%{?fedora} < 24 && 0%{?rhel} < 8 @@ -219,7 +213,7 @@ fi  %files -%{?_licensedir:%license NTS/LICENSE} +%{?_licensedir:%license %{sources}/LICENSE}  %doc %{pecl_docdir}/%{pecl_name}  %{pecl_xmldir}/%{name}.xml @@ -233,6 +227,9 @@ fi  %changelog +* Thu Jul 20 2023 Remi Collet <remi@remirepo.net> - 1.1.1-17 +- build out of sources tree +  * Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.1.1-16  - rebuild for 8.1.0RC1  | 
