diff options
| -rw-r--r-- | php-maxminddb.spec | 41 | 
1 files changed, 10 insertions, 31 deletions
| diff --git a/php-maxminddb.spec b/php-maxminddb.spec index ff767e2..8cd7471 100644 --- a/php-maxminddb.spec +++ b/php-maxminddb.spec @@ -1,6 +1,6 @@  # remirepo spec file for php-maxminddb  # -# Copyright (c) 2018-2023 Remi Collet +# Copyright (c) 2018-2024 Remi Collet  # License: CC-BY-SA-4.0  # http://creativecommons.org/licenses/by-sa/4.0/  # @@ -46,10 +46,8 @@ BuildRequires: pkgconfig(libmaxminddb) >= 1.0.0  Requires:      %{?scl_prefix}php(zend-abi) = %{php_zend_api}  Requires:      %{?scl_prefix}php(api) = %{php_core_api}  # Weak dependencie on databasess -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8  Recommends:    geolite2-country  Suggests:      geolite2-city -%endif  # PECL  Provides:       %{?scl_prefix}php-pecl-%{pecl_name}          = %{version}-%{release} @@ -95,14 +93,12 @@ Requires:      php(language) >= 7.2  #        "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",  #        "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder",  #        "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups" -%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8  Recommends:    php-bcmath  Recommends:    php-gmp  Recommends:    php-maxminddb  # Weak dependencies on databases  Recommends:    geolite2-country  Suggests:      geolite2-city -%endif  # from composer.json "conflict": {  #        "ext-maxminddb": "<1.11.1,>=2.0.0"  Conflicts:     php-maxminddb < %{version} @@ -166,13 +162,16 @@ EOF  cd ext  %{__phpize} +[ -f Makefile.global ] && GLOBAL=Makefile.global || GLOBAL=build/Makefile.global +sed -e 's/INSTALL_ROOT/DESTDIR/' -i $GLOBAL  cd ../NTS  %configure \      --with-php-config=%{__phpconfig} \      --with-libdir=%{_lib} \      --with-maxminddb -make %{?_smp_mflags} + +%make_build  %if %{with_zts}  cd ../ZTS @@ -180,7 +179,8 @@ cd ../ZTS      --with-php-config=%{__ztsphpconfig} \      --with-libdir=%{_lib} \      --with-maxminddb -make %{?_smp_mflags} + +%make_build  %endif @@ -190,12 +190,12 @@ make %{?_smp_mflags}  install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml  # Install the NTS stuff -make -C NTS install INSTALL_ROOT=%{buildroot} +%make_install -C NTS  install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}  %if %{with_zts}  # Install the ZTS stuff -make -C ZTS install INSTALL_ROOT=%{buildroot} +%make_install -C ZTS  install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}  %endif @@ -236,7 +236,7 @@ REPORT_EXIT_STATUS=1 \  %if %{with_lib} && %{with tests}  cd ..  : Upstream test suite for the library -for cmd in php php80 php81 php82 php83; do +for cmd in php php81 php82 php83 php84; do    if which $cmd; then      $cmd %{_bindir}/phpunit8 \        --bootstrap %{buildroot}%{_datadir}/php/MaxMind/Db/Reader/autoload.php \ @@ -253,28 +253,7 @@ php --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \  exit $ret -%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  %doc *.md  %{pecl_xmldir}/%{name}.xml | 
