Initial commit
This commit is contained in:
commit
a3d32a07a1
1
SOURCES/10-maxminddb.conf
Normal file
1
SOURCES/10-maxminddb.conf
Normal file
@ -0,0 +1 @@
|
||||
LoadModule maxminddb_module modules/mod_maxminddb.so
|
9
SOURCES/maxminddb.conf
Normal file
9
SOURCES/maxminddb.conf
Normal file
@ -0,0 +1,9 @@
|
||||
<IfModule mod_maxminddb.c>
|
||||
MaxMindDBEnable On
|
||||
|
||||
# GeoLite2 databases (provided by the RPM packages geolite2-country
|
||||
# and geolite2-city) are free IP geolocation databases comparable to,
|
||||
# but less accurate than, MaxMind's commercial GeoIP2 databases.
|
||||
MaxMindDBFile COUNTRY_DB /usr/share/GeoIP/GeoLite2-Country.mmdb
|
||||
MaxMindDBFile CITY_DB /usr/share/GeoIP/GeoLite2-City.mmdb
|
||||
</IfModule>
|
51
SPECS/mod_maxminddb.spec
Normal file
51
SPECS/mod_maxminddb.spec
Normal file
@ -0,0 +1,51 @@
|
||||
# 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
|
||||
URL: https://maxmind.github.io/mod_maxminddb/
|
||||
Source0: https://github.com/maxmind/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||
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
|
||||
%else
|
||||
Requires: geolite2-country
|
||||
Requires: geolite2-city
|
||||
%endif
|
||||
|
||||
%description
|
||||
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.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%{_httpd_apxs} -lmaxminddb -c src/%{name}.c # Avoid faulty upstream Makefile
|
||||
|
||||
%install
|
||||
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
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc Changes.md README.md
|
||||
%config(noreplace) %{_httpd_modconfdir}/10-maxminddb.conf
|
||||
%config(noreplace) %{_httpd_confdir}/maxminddb.conf
|
||||
%{_httpd_moddir}/%{name}.so
|
||||
|
||||
%changelog
|
||||
* 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
|
Loading…
Reference in New Issue
Block a user