[packages/apache-mod_geoip] - build with apache 2.4 - rel 2
baggins
baggins at pld-linux.org
Sun May 5 20:54:35 CEST 2013
commit 9ea79f6377ca85da4eb84feb33b2584b51d180d0
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun May 5 20:54:21 2013 +0200
- build with apache 2.4
- rel 2
apache-mod_geoip.spec | 6 ++++--
mod_geoip-apache24.patch | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/apache-mod_geoip.spec b/apache-mod_geoip.spec
index bc81d6e..6eeae20 100644
--- a/apache-mod_geoip.spec
+++ b/apache-mod_geoip.spec
@@ -1,15 +1,16 @@
%define mod_name geoip
-%define apxs %{_sbindir}/apxs
+%define pxs %{_sbindir}/apxs
Summary: GeoIP module for the Apache HTTP Server
Name: apache-mod_%{mod_name}
Version: 1.2.7
-Release: 1
+Release: 2
License: ASL 1.1
Group: Daemons
URL: https://www.maxmind.com/app/mod_geoip
Source0: http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_%{mod_name}2_%{version}.tar.gz
# Source0-md5: 76514ad0e8adb8cd8231c5e3646d03fd
Source1: apache.conf
+Patch0: mod_geoip-apache24.patch
BuildRequires: %{apxs}
BuildRequires: GeoIP-devel >= 1.4.8
BuildRequires: apache-devel >= 2.2
@@ -31,6 +32,7 @@ license.
%prep
%setup -q -n mod_geoip2_%{version}
+%patch0 -p0
%build
%{apxs} -Wc,"%{rpmcppflags} %{rpmcflags}" -Wl,"-lGeoIP %{rpmldflags}" -c mod_geoip.c
diff --git a/mod_geoip-apache24.patch b/mod_geoip-apache24.patch
new file mode 100644
index 0000000..563e35b
--- /dev/null
+++ b/mod_geoip-apache24.patch
@@ -0,0 +1,35 @@
+--- mod_geoip.c.geoip
++++ mod_geoip.c
+@@ -66,6 +66,7 @@
+ #include "http_config.h"
+ #include "http_protocol.h"
+ #include "http_log.h"
++#include "util_script.h"
+ #include "ap_config.h"
+ #include "apr_strings.h"
+ #include <GeoIP.h>
+@@ -320,7 +321,11 @@
+ return DECLINED;
+
+ if (!cfg->scanProxyHeaders) {
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
+ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_add_common_vars(r);
+@@ -338,7 +343,11 @@
+ }
+ if (!ipaddr_ptr) {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: Error while getting ipaddr from proxy headers. Using REMOTE_ADDR.");
+- ipaddr = r->connection->remote_ip;
++#if AP_MODULE_MAGIC_AT_LEAST(20111130,0)
++ ipaddr = r->useragent_ip;
++#else
++ ipaddr = r->connection->remote_ip;
++#endif
+ }
+ else {
+ ap_log_error(APLOG_MARK, APLOG_DEBUG | APLOG_NOERRNO, 0, r->server, "[mod_geoip]: IPADDR_PTR: %s", ipaddr_ptr);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_geoip.git/commitdiff/9ea79f6377ca85da4eb84feb33b2584b51d180d0
More information about the pld-cvs-commit
mailing list