]> git.pld-linux.org Git - packages/apache-mod_cloudflare.git/blame - apache-mod_cloudflare.spec
new, version 1.2.0
[packages/apache-mod_cloudflare.git] / apache-mod_cloudflare.spec
CommitLineData
b4ff000f
ER
1%define mod_name cloudflare
2%define apxs %{_sbindir}/apxs
3Summary: Apache module to show true visitor IPs in logs for domains using CloudFlare
4Name: apache-mod_%{mod_name}
5Version: 1.2.0
6Release: 1
7License: Apache v2.0
8Group: Networking/Daemons/HTTP
9Source0: https://github.com/cloudflare/mod_cloudflare/archive/master/mod_%{mod_name}-%{version}.tar.gz
10# Source0-md5: d87e1c38dba2c282bfae9341e0f3c3e7
11Source1: apache.conf
12BuildRequires: apache-devel >= 2.2
13BuildRequires: rpmbuild(macros) >= 1.268
14Requires: apache(modules-api) = %apache_modules_api
15BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
16
17%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
18%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
19
20%description
21CloudFlare acts as a proxy, which means that your visitors are routed
22through the CloudFlare network and you do not see their original IP
23address.
24
25This module uses HTTP headers provided by the CloudFlare proxy to log
26the real IP address of the visitor. Based on mod_remoteip.c, this
27apache extension will replace the remote_ip variable in user's logs
28with the correct remote_ip sent from CloudFlare. This also does
29authentication, only performing the switch for requests originating
30from CloudFlare IPs.
31
32%prep
33%setup -qc
34mv mod_cloudflare-*/* .
35
36%build
37%{apxs} -c mod_%{mod_name}.c -o mod_%{mod_name}.so
38
39%install
40rm -rf $RPM_BUILD_ROOT
41install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
42install -p mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
43cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
44
45%clean
46rm -rf $RPM_BUILD_ROOT
47
48%post
49%service -q httpd restart
50
51%postun
52if [ "$1" = "0" ]; then
53 %service -q httpd restart
54fi
55
56%files
57%defattr(644,root,root,755)
58%doc README.md
59%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
60%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
This page took 0.066107 seconds and 4 git commands to generate.