Compare commits

...
Sign in to create a new pull request.

5 commits

Author SHA1 Message Date
Remi Collet
30e9bcf8b6 v1.13.0
(cherry picked from commit 391aaa7bf4)
(cherry picked from commit a5647dece3)
2025-11-21 08:50:10 +01:00
Remi Collet
9c25bcfaa3 update to 1.12.1
re-license spec file to CECILL-2.1

(cherry picked from commit d0009e4dd9)
(cherry picked from commit ba6ad2381d)
2025-05-06 08:52:54 +02:00
Remi Collet
dd1ba87d20 v1.12.0
(cherry picked from commit 98b460f37c)
2024-11-15 08:30:16 +01:00
Remi Collet
4a5450495c v1.11.1
(cherry picked from commit 84f30ac956)
(cherry picked from commit 2198caa60d)
(cherry picked from commit 9e9cf4bdbf)
2023-12-04 10:01:33 +01:00
Remi Collet
35c5901a12 add missing dependency on fedora/autoloader
build out of sources tree

(cherry picked from commit 07ae24e5f2)
2023-10-02 08:48:31 +02:00
3 changed files with 56 additions and 31 deletions

4
.gitignore vendored
View file

@ -9,3 +9,7 @@ clog
/php-maxminddb-1.10.0-07f84d9.tgz /php-maxminddb-1.10.0-07f84d9.tgz
/php-maxminddb-1.10.1-569bd44.tgz /php-maxminddb-1.10.1-569bd44.tgz
/php-maxminddb-1.11.0-f7cc1a1.tgz /php-maxminddb-1.11.0-f7cc1a1.tgz
/php-maxminddb-1.11.1-1e66f73.tgz
/php-maxminddb-1.12.0-5b2d7a7.tgz
/php-maxminddb-1.12.1-815939e.tgz
/php-maxminddb-1.13.0-b298986.tgz

View file

@ -3,13 +3,19 @@
# #
# remirepo spec file for php-maxminddb # remirepo spec file for php-maxminddb
# #
# Copyright (c) 2018-2021 Remi Collet # SPDX-FileCopyrightText: Copyright 2018-2025 Remi Collet
# License: CC-BY-SA # SPDX-License-Identifier: CECILL-2.1
# http://creativecommons.org/licenses/by-sa/4.0/ # http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
# #
# Please, preserve the changelog entries # Please, preserve the changelog entries
# #
%global gh_commit f7cc1a1472868f25a02636c99d1054232292bc26
%{!?__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 gh_commit b298986c4f2c75ff080d9f6f4839bec46bda70f3
%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner maxmind %global gh_owner maxmind
%global gh_project MaxMind-DB-Reader-php %global gh_project MaxMind-DB-Reader-php
@ -20,6 +26,8 @@
# pure PHP library # pure PHP library
%global pk_vendor maxmind-db %global pk_vendor maxmind-db
%global pk_project reader %global pk_project reader
%global _configure ../ext/configure
%if 0%{?fedora} %if 0%{?fedora}
%bcond_without tests %bcond_without tests
%else %else
@ -28,9 +36,9 @@
Summary: MaxMind DB Reader extension Summary: MaxMind DB Reader extension
Name: php-maxminddb Name: php-maxminddb
Version: 1.11.0 Version: 1.13.0
Release: 3%{?dist} Release: 1%{?dist}
License: ASL 2.0 License: Apache-2.0
URL: https://github.com/%{gh_owner}/%{gh_project} URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz Source0: %{name}-%{version}-%{gh_short}.tgz
@ -94,7 +102,7 @@ Recommends: php-bcmath
Recommends: php-gmp Recommends: php-gmp
Recommends: php-maxminddb Recommends: php-maxminddb
# from composer.json "conflict": { # from composer.json "conflict": {
# "ext-maxminddb": "<1.10.0,>=2.0.0" # "ext-maxminddb": "<1.11.1,>=2.0.0"
Conflicts: php-maxminddb < %{version} Conflicts: php-maxminddb < %{version}
# Weak dependencies on databases # Weak dependencies on databases
Recommends: geolite2-country Recommends: geolite2-country
@ -102,6 +110,8 @@ Suggests: geolite2-city
# From phpcompatifo report for 1.3.0 # From phpcompatifo report for 1.3.0
Requires: php-filter Requires: php-filter
Requires: php-spl Requires: php-spl
# Autoloader
Requires: php-composer(fedora/autoloader)
Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version} Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
@ -127,10 +137,7 @@ Autoloader: %{_datadir}/php/MaxMind/Db/Reader/autoload.php
--output src/MaxMind/Db/Reader/autoload.php \ --output src/MaxMind/Db/Reader/autoload.php \
src/MaxMind/Db src/MaxMind/Db
mv ext NTS cd ext
cd NTS
# Sanity check, really often broken # Sanity check, really often broken
extver=$(sed -n '/#define PHP_MAXMINDDB_VERSION/{s/.* "//;s/".*$//;p}' php_maxminddb.h) extver=$(sed -n '/#define PHP_MAXMINDDB_VERSION/{s/.* "//;s/".*$//;p}' php_maxminddb.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
@ -139,9 +146,9 @@ if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
fi fi
cd .. cd ..
mkdir NTS
%if %{with_zts} %if %{with_zts}
# duplicate for ZTS build mkdir ZTS
cp -pr NTS ZTS
%endif %endif
# Drop in the bit of configuration # Drop in the bit of configuration
@ -152,19 +159,20 @@ EOF
%build %build
cd NTS cd ext
%{_bindir}/phpize %{__phpize}
cd ../NTS
%configure \ %configure \
--with-php-config=%{_bindir}/php-config \ --with-php-config=%{__phpconfig} \
--with-libdir=%{_lib} \ --with-libdir=%{_lib} \
--with-maxminddb --with-maxminddb
make %{?_smp_mflags} make %{?_smp_mflags}
%if %{with_zts} %if %{with_zts}
cd ../ZTS cd ../ZTS
%{_bindir}/zts-phpize
%configure \ %configure \
--with-php-config=%{_bindir}/zts-php-config \ --with-php-config=%{__ztsphpconfig} \
--with-libdir=%{_lib} \ --with-libdir=%{_lib} \
--with-maxminddb --with-maxminddb
make %{?_smp_mflags} make %{?_smp_mflags}
@ -193,38 +201,33 @@ cp -pr src/MaxMind/Db %{buildroot}%{_datadir}/php/MaxMind/Db
: Minimal load test for NTS extension : Minimal load test for NTS extension
%{__php} --no-php-ini \ %{__php} --no-php-ini \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name} --modules | grep '^%{pecl_name}$'
%if %{with_zts} %if %{with_zts}
: Minimal load test for ZTS extension : Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \ %{__ztsphp} --no-php-ini \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name} --modules | grep '^%{pecl_name}$'
%endif %endif
ret=0 ret=0
cd NTS cd ext
: Upstream test suite for NTS extension : Upstream test suite for NTS extension
TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \ %{__php} -n run-tests.php -q --show-diff || ret=1
REPORT_EXIT_STATUS=1 \
%{__php} -n run-tests.php --show-diff || ret=1
%if %{with_zts} %if %{with_zts}
cd ../ZTS
: Upstream test suite for ZTS extension : Upstream test suite for ZTS extension
TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so" \
NO_INTERACTION=1 \ %{__ztsphp} -n run-tests.php -q --show-diff || ret=1
REPORT_EXIT_STATUS=1 \
%{__ztsphp} -n run-tests.php --show-diff || ret=1
%endif %endif
%if %{with tests} %if %{with tests}
cd .. cd ..
: Upstream test suite for the library : Upstream test suite for the library
for cmd in php php72 php73 php74 php80 php81; do for cmd in php php80 php81 php82 php83; do
if which $cmd; then if which $cmd; then
$cmd %{_bindir}/phpunit8 \ $cmd %{_bindir}/phpunit8 \
--bootstrap %{buildroot}%{_datadir}/php/MaxMind/Db/Reader/autoload.php \ --bootstrap %{buildroot}%{_datadir}/php/MaxMind/Db/Reader/autoload.php \
@ -264,6 +267,24 @@ exit $ret
%changelog %changelog
* Fri Nov 21 2025 Remi Collet <remi@remirepo.net> - 1.13.0-1
- update to 1.13.0
* Tue May 6 2025 Remi Collet <remi@remirepo.net> - 1.12.1-1
- update to 1.12.1
- re-license spec file to CECILL-2.1
* Fri Nov 15 2024 Remi Collet <remi@remirepo.net> - 1.12.0-1
- update to 1.12.0
* Mon Dec 4 2023 Remi Collet <remi@remirepo.net> - 1.11.1-1
- update to 1.11.1
* Mon Oct 2 2023 Remi Collet <remi@remirepo.net> - 1.11.0-10
- add missing dependency on fedora/autoloader
- build out of sources tree
- use SPDX license ID
* Fri Dec 10 2021 Remi Collet <remi@remirepo.net> - 1.11.0-3 * Fri Dec 10 2021 Remi Collet <remi@remirepo.net> - 1.11.0-3
- disable library test suite for EL build - disable library test suite for EL build

View file

@ -1 +1 @@
SHA512 (php-maxminddb-1.11.0-f7cc1a1.tgz) = d0d7ce79ed152ba9277997515cade9a8c7a043d1a23a27e6838ad48b3e4f8854327356f3a1d30dff156a203ec65329d3f1d936a26a1e9ee5ae87c4ff400f2997 SHA512 (php-maxminddb-1.13.0-b298986.tgz) = c506564948c4a8766cd7b5241af5897c82fc85806eb9d9aa64d6625fc51fefecabd1314396690c806ac2ecd0e489ad54ba27812e04cf04c93b1d1f0d27777ca5