]> git.pld-linux.org Git - packages/apache-mod_geoip.git/blame - apache-mod_geoip.spec
- cppflags, ldflags
[packages/apache-mod_geoip.git] / apache-mod_geoip.spec
CommitLineData
030af1e3
ER
1%define mod_name geoip
2%define apxs %{_sbindir}/apxs
3Summary: GeoIP module for the Apache HTTP Server
4Name: apache-mod_%{mod_name}
5Version: 1.2.7
6Release: 1
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
030af1e3 13BuildRequires: %{apxs}
ac10e593 14BuildRequires: GeoIP-devel
030af1e3
ER
15BuildRequires: apache-devel >= 2.2
16BuildRequires: rpmbuild(macros) >= 1.268
030af1e3 17Requires: apache(modules-api) = %apache_modules_api
ac10e593
ER
18Suggests: GeoIP-db-City
19Suggests: GeoIP-db-Country
20Suggests: GeoIP-db-IPASNum
030af1e3
ER
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null)
24%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d
25
26%description
27mod_geoip is an Apache module for finding the country that a web
28request originated from. It uses the GeoIP library and database to
29perform the lookup. It is free software, licensed under the Apache
30license.
31
32%prep
33%setup -q -n mod_geoip2_%{version}
34
35%build
e4ae4de3 36%{apxs} -Wc,"%{rpmcppflags} %{rpmcflags}" -Wl,"-lGeoIP %{rpmldflags}" -c mod_geoip.c
030af1e3
ER
37
38%install
39rm -rf $RPM_BUILD_ROOT
40install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}}
41install -Dp .libs/mod_geoip.so $RPM_BUILD_ROOT%{_pkglibdir}
42
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
57%files
58%defattr(644,root,root,755)
59%doc INSTALL README* Changes
60%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf
61%attr(755,root,root) %{_pkglibdir}/mod_%{mod_name}.so
This page took 0.056714 seconds and 4 git commands to generate.