summaryrefslogtreecommitdiffstats
path: root/SPECS/mod_removeip.spec
blob: b9e7dc9aa9074c9dfc1260e581812c77099dd511 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Name:           mod_removeip
Version:        1.0b
Release:        1%{?dist}
Summary:        Module to remove IP from apache2's logs

Group:          System Environment/Daemons
License:        Apache Software License
URL:            http://dev.riseup.net/privacy/apache/
Source0:        libapache-mod-removeip_%{version}.tar.gz
Source1:	mod_removeip.conf
Patch0:		mod_removeip.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  httpd-devel >= 2.2.3
Requires:       httpd httpd-mmn = %([ -a %{_includedir}/httpd/.mmn ] && cat %{_includedir}/httpd/.mmn || echo missing)

%description
This package provides the removeip module for the Apache 2 webserver. This module allows for overwriting Apache's environment
variable REMOTE_ADDR with a fixed value. This is necessary to anonymize all logs written by Apache and to prevent web applications
from accessing the original IP address.

Please be advised that activating this module may cause unexpected side effects to the behavior of your web applications. 

%prep
%setup -q -n libapache-mod-removeip-%{version}
%patch0 -p1


%build
cd apache2.0
/usr/sbin/apxs -Wc,"%{optflags}" -c mod_removeip.c


%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_libdir}/httpd/modules/
mkdir -p %{buildroot}/%{_sysconfdir}/httpd/conf.d/
install -p apache2.0/.libs/mod_removeip.so %{buildroot}/%{_libdir}/httpd/modules/
install -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/httpd/conf.d/

# Docs don't need to be executable
chmod -x CHANGES README

%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%doc CHANGES README
%{_libdir}/httpd/modules/mod_removeip.so
%config(noreplace) /etc/httpd/conf.d/mod_removeip.conf


%changelog
* Sat Nov 05 2011 Marcel Haerry <mh+rpms@scrit.ch> 1.0b-1
- Initial build