# # spec file for package php7-maxminddb # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define source_file MaxMind-DB-Reader-php %define pkg_name maxminddb Name: php7-%{pkg_name} Version: 1.6.0 Release: 1.1 Summary: PHP extension providing access to maxminddb databases License: Apache-2.0 Group: Productivity/Networking/Web/Servers URL: https://pecl.php.net/package/maxminddb Source0: https://github.com/maxmind/%{source_file}/archive/v%{version}.tar.gz#/%{source_file}-%{version}.tar.gz BuildRequires: php7-devel >= 7.0.0 BuildRequires: pkgconfig BuildRequires: re2c BuildRequires: pkgconfig(libmaxminddb) Requires: php(api) = %{php_core_api} Requires: php(zend-abi) = %{php_zend_api} Provides: php-%{pkg_name} = %{version} Obsoletes: php-%{pkg_name} < %{version} %description This extension provides access to maxminddb databases and is a drop-in replacement for MaxMind\Db\Reader. %prep %setup -q -n %{source_file}-%{version} %build cd ext export CFLAGS="%{optflags} -fvisibility=hidden" %{_bindir}/phpize %configure make %{?_smp_mflags} %check cd ext make %{?_smp_mflags} PHP_EXECUTABLE=%{__php} NO_INTERACTION=1 test %install cd ext make DESTDIR=%{buildroot} install INSTALL_ROOT=%{buildroot} mkdir -p %{buildroot}%{_sysconfdir}/php7/conf.d echo '; comment out next line to disable the extension extension = %{pkg_name}.so' > %{buildroot}%{_sysconfdir}/php7/conf.d/%{pkg_name}.ini %files %defattr(0644,root,root,-) %license LICENSE %doc README.md CHANGELOG.md %config(noreplace) %{_sysconfdir}/php7/conf.d/%{pkg_name}.ini /usr/lib/php7/extensions/%{pkg_name}.so %changelog * Thu Jan 9 2020 Johannes Weberhofer - Updated to version 1.6.0 * fix for a possible memory corruption in version 1.5.0 and 1.5.1 * composer.json file now conflicts with all versions of the maxminddb C extension less than the Composer version. - Updated to version 1.5.1 * Minor performance improvements. * Make tests pass with older versions of libmaxminddb * Make tests pass with older versions of libmaxminddb - Updated to version 1.5.0 * PHP 5.6 or greater is now required. * supports for PHP 8 * new method, getWithPrefixLen, was added to the Reader class * Wed Jun 19 2019 Johannes Weberhofer - Updated to version 1.4.1 * The maxminddb extension now returns a string when a uint32 value is greater than LONG_MAX. Previously, the value would overflow. This generally only affects 32-bit machines. * For uint64 values, the maxminddb extension now returns an integer rather than a string when the value is less than or equal to LONG_MAX. This more closely matches the behavior of the pure PHP reader. - Updated to version 1.4.0 * The maxminddb extension now has the arginfo when using reflection. * The maxminddb extension now provides MINFO() function that displays the extension version and the libmaxminddb version. * The maxminddb configure script now uses pkg-config when available to get libmaxmindb build info. * The pure PHP reader now correctly decodes integers on 32-bit platforms. Previously, large integers would overflow. * There are small performance improvements for the pure PHP reader. * Thu May 17 2018 jweberhofer@weberhofer.at - Initial release 1.3.0