1
0

Accepting request 610116 from home:weberho:PHP56

Initial release 1.1.0
The old mod_geoip module will stop working 2019 because maxmind will no longer update the old database format.

OBS-URL: https://build.opensuse.org/request/show/610116
OBS-URL: https://build.opensuse.org/package/show/Apache:Modules/apache2-mod_maxminddb?expand=0&rev=1
This commit is contained in:
Petr Gajdos 2018-05-18 05:54:50 +00:00 committed by Git OBS Bridge
commit f77916cc75
6 changed files with 153 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

View File

@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu May 17 14:11:14 UTC 2018 - jweberhofer@weberhofer.at
- Initial release 1.1.0

View File

@ -0,0 +1,68 @@
#
# spec file for package apache2-mod_maxminddb
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%define modname mod_maxminddb
Name: apache2-mod_maxminddb
Version: 1.1.0
Release: 0
Summary: MaxMind DB Apache Module
License: Apache-2.0
Group: Productivity/Networking/Web/Servers
URL: https://maxmind.github.io/mod_maxminddb/
Source: https://github.com/maxmind/mod_maxminddb/releases/download/%{version}/mod_maxminddb-%{version}.tar.gz
Source2: %{modname}.conf
BuildRequires: apache-rpm-macros
BuildRequires: apache2-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libmaxminddb)
Requires: %{apache_mmn}
Requires: %{apache_suse_maintenance_mmn}
Requires: apache2
%description
This module allows you to query MaxMind DB files from Apache 2.2+ using the libmaxminddb library.
%prep
%setup -q -n %{modname}-%{version}
# This config file is used for loading the module without
# enabling any databases which are not available on OBS
echo "MaxMindDBEnable On" > test-enable-module.conf
%build
%configure
make %{?_smp_mflags}
%check
set +x
%apache_test_module_load -m maxminddb -i test-enable-module.conf
set -x
%install
mkdir -p %{buildroot}/%{apache_libexecdir}
cp -p src/.libs/%{modname}.so %{buildroot}/%{apache_libexecdir}
mkdir -p %{buildroot}/%{apache_sysconfdir}/conf.d
cp %{SOURCE2} %{buildroot}/%{apache_sysconfdir}/conf.d
%files
%doc Changes.md README.md
%license LICENSE
%{apache_libexecdir}/%{modname}.so
%config(noreplace) %{apache_sysconfdir}/conf.d/%{modname}.conf
%changelog

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b31e63764ddcc1379229059a4726c733ee0538018727b1336d02afaaa8940782
size 99821

54
mod_maxminddb.conf Normal file
View File

@ -0,0 +1,54 @@
<IfModule mod_maxminddb.c>
MaxMindDBEnable On
# ###
# specify database locations
#
MaxMindDBFile COUNTRY_DB /var/lib/GeoIP/GeoLite2-Country.mmdb
MaxMindDBFile CITY_DB /var/lib/GeoIP/GeoLite2-City.mmdb
# ###
# assign the lookup result to an environment variable
#
MaxMindDBEnv COUNTRY_CODE COUNTRY_DB/country/iso_code
MaxMindDBEnv REGION_CODE CITY_DB/subdivisions/0/iso_code
# ###
# ASN Database
#
#MaxMindDBFile ASN_DB /var/lib/GeoIP/GeoLite2-ASN.mmdb
#
#MaxMindDBEnv MM_ASN ASN_DB/autonomous_system_number
#MaxMindDBEnv MM_ASORG ASN_DB/autonomous_system_organization
# ###
# City Database
#
#MaxMindDBEnv MM_COUNTRY_CODE CITY_DB/country/iso_code
#MaxMindDBEnv MM_COUNTRY_NAME CITY_DB/country/names/en
#MaxMindDBEnv MM_CITY_NAME CITY_DB/city/names/en
#MaxMindDBEnv MM_LONGITUDE CITY_DB/location/longitude
#MaxMindDBEnv MM_LATITUDE CITY_DB/location/latitude
# ###
# Connection-Type Database
#
#MaxMindDBFile CONNECTION_TYPE_DB /var/lib/GeoIP/GeoIP2-Connection-Type.mmdb
#MaxMindDBEnv MM_CONNECTION_TYPE CONNECTION_TYPE_DB/connection_type
# ###
# Domain Database
#
#MaxMindDBFile DOMAIN_DB /var/lib/GeoIP/GeoIP2-Domain.mmdb
#MaxMindDBEnv MM_DOMAIN DOMAIN_DB/domain
# ###
# ISP Database
#
#MaxMindDBFile ISP_DB /var/lib/GeoIP/GeoIP2-ISP.mmdb
#
#MaxMindDBEnv MM_ASN ISP_DB/autonomous_system_number
#MaxMindDBEnv MM_ASORG ISP_DB/autonomous_system_organization
#MaxMindDBEnv MM_ISP ISP_DB/isp
#MaxMindDBEnv MM_ORG ISP_DB/organization
</IfModule>