You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.8 KiB

# Module Magic Number
%{!?_httpd_mmn: %global _httpd_mmn %(cat %{_includedir}/httpd/.mmn 2> /dev/null || echo 0-0)}
Summary: Module for the Apache web server to query MaxMind DB files
Name: mod_maxminddb
Version: 1.2.0
Release: 1%{?dist}
License: ASL 2.0
Source1: 10-maxminddb.conf
Source2: maxminddb.conf
BuildRequires: gcc
BuildRequires: httpd-devel >= 2.2.0
BuildRequires: libmaxminddb-devel
Requires: httpd-mmn = %{_httpd_mmn}
%if 0%{?fedora} || (0%{?rhel} && 0%{?rhel} > 7)
Recommends: geolite2-country
Recommends: geolite2-city
Requires: geolite2-country
Requires: geolite2-city
The mod_maxminddb allows to query MaxMind DB files from the Apache web
server using the libmaxminddb library. The MaxMind DB files are provided
as free GeoLite2 databases as well as commercial GeoIP2 databases.
%setup -q
%{_httpd_apxs} -lmaxminddb -c src/%{name}.c # Avoid faulty upstream Makefile
install -D -p -m 0755 src/.libs/%{name}.so $RPM_BUILD_ROOT%{_httpd_moddir}/%{name}.so
install -D -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-maxminddb.conf
install -D -p -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_confdir}/maxminddb.conf
%license LICENSE
%config(noreplace) %{_httpd_modconfdir}/10-maxminddb.conf
%config(noreplace) %{_httpd_confdir}/maxminddb.conf
* Sun Nov 28 2021 Robert Scheck <robert@fedoraproject.or> 1.2.0-1
- Upgrade to 1.2.0 (#2027078)
- Initial spec file for Fedora and Red Hat Enterprise Linux