]> git.pld-linux.org Git - packages/apache-mod_cloudflare.git/blame - apache-mod_cloudflare.spec
- up to current version (unknown number so using 1.2.1)
[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}
b11b0a63 5Version: 1.2.1
b4ff000f
ER
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
b11b0a63 10# Source0-md5: b451823076713c1faa64c09e111a98b8
b4ff000f
ER
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
b11b0a63 37%{apxs} -c mod_%{mod_name}.c
b4ff000f
ER
38
39%install
40rm -rf $RPM_BUILD_ROOT
41install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
b11b0a63
AM
42
43%{apxs} -i -S LIBEXECDIR=$RPM_BUILD_ROOT%{_pkglibdir} -n 'mod_cloudflare' mod_cloudflare.la
44
b4ff000f
ER
45cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/90_mod_%{mod_name}.conf
46
47%clean
48rm -rf $RPM_BUILD_ROOT
49
50%post
51%service -q httpd restart
52
53%postun
54if [ "$1" = "0" ]; then
55 %service -q httpd restart
56fi
57
58%files
59%defattr(644,root,root,755)
60%doc README.md
61%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
62%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
This page took 0.122606 seconds and 4 git commands to generate.