]> git.pld-linux.org Git - packages/apache-mod_geoip.git/blame_incremental - apache-mod_geoip.spec
- build with apache 2.4
[packages/apache-mod_geoip.git] / apache-mod_geoip.spec
... / ...
CommitLineData
1%define mod_name geoip
2%define pxs %{_sbindir}/apxs
3Summary: GeoIP module for the Apache HTTP Server
4Name: apache-mod_%{mod_name}
5Version: 1.2.7
6Release: 2
7License: ASL 1.1
8Group: Daemons
9URL: https://www.maxmind.com/app/mod_geoip
10Source0: http://www.maxmind.com/download/geoip/api/mod_geoip2/mod_%{mod_name}2_%{version}.tar.gz
11# Source0-md5: 76514ad0e8adb8cd8231c5e3646d03fd
12Source1: apache.conf
13Patch0: mod_geoip-apache24.patch
14BuildRequires: %{apxs}
15BuildRequires: GeoIP-devel >= 1.4.8
16BuildRequires: apache-devel >= 2.2
17BuildRequires: rpmbuild(macros) >= 1.268
18Requires: apache(modules-api) = %apache_modules_api
19Suggests: GeoIP-db-City
20Suggests: GeoIP-db-Country
21Suggests: GeoIP-db-IPASNum
22BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
25%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
26
27%description
28mod_geoip is an Apache module for finding the country that a web
29request originated from. It uses the GeoIP library and database to
30perform the lookup. It is free software, licensed under the Apache
31license.
32
33%prep
34%setup -q -n mod_geoip2_%{version}
35%patch0 -p0
36
37%build
38%{apxs} -Wc,"%{rpmcppflags} %{rpmcflags}" -Wl,"-lGeoIP %{rpmldflags}" -c mod_geoip.c
39
40%install
41rm -rf $RPM_BUILD_ROOT
42install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
43install -Dp .libs/mod_geoip.so $RPM_BUILD_ROOT%{_pkglibdir}
44
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
59%files
60%defattr(644,root,root,755)
61%doc INSTALL README* Changes
62%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
63%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
This page took 0.180742 seconds and 4 git commands to generate.