b3f6f0d
%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}}
1d8eb7b
%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}}
b3f6f0d
# /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4
b3f6f0d
%{!?_httpd_confdir:    %{expand: %%global _httpd_confdir    %%{_sysconfdir}/httpd/conf.d}}
5d80787
%{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}}
5d80787
%{!?_httpd_moddir:     %{expand: %%global _httpd_moddir     %%{_libdir}/httpd/modules}}
5d80787
5d80787
Summary:	GeoIP module for the Apache HTTP Server
5d80787
Name:		mod_geoip
e06f5d7
Version:	1.2.10
447ea9d
Release:	6%{?dist}
5d80787
Group:		System Environment/Daemons
5d80787
License:	ASL 1.1
e06f5d7
URL:		http://dev.maxmind.com/geoip/legacy/mod_geoip2/
e06f5d7
Source0:	https://github.com/maxmind/geoip-api-mod_geoip2/archive/%{version}.tar.gz
e06f5d7
Source1:	10-geoip.conf
e06f5d7
Source2:	geoip.conf
5d80787
BuildRequires:	httpd-devel, GeoIP-devel >= 1.4.3
5d80787
Requires:	GeoIP%{?_isa}, httpd-mmn = %{_httpd_mmn}
5d80787
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Michael Fleming ccf734c
Michael Fleming ccf734c
%description
5d80787
mod_geoip is an Apache module to look up geolocation information for a
5d80787
client as part of the HTTP request process. It uses the GeoIP library
5d80787
and database to perform the lookup. It is free software, licensed under
5d80787
the Apache license.
Michael Fleming ccf734c
Michael Fleming ccf734c
%prep
e06f5d7
%setup -q -n geoip-api-mod_geoip2-%{version}
Michael Fleming ccf734c
Michael Fleming ccf734c
%build
5d80787
%{_httpd_apxs} -Wc,-Wall -Wl,"-lGeoIP" -c %{name}.c
Michael Fleming ccf734c
Michael Fleming ccf734c
%install
c1d1974
rm -rf $RPM_BUILD_ROOT
5d80787
install -D -p -m 755 .libs/%{name}.so $RPM_BUILD_ROOT%{_httpd_moddir}/%{name}.so
Michael Fleming ccf734c
5d80787
%if "%{_httpd_modconfdir}" == "%{_httpd_confdir}"
5d80787
# httpd <= 2.2.x
e06f5d7
cat %{SOURCE1} > unified.conf
5d80787
echo >> unified.conf
e06f5d7
cat %{SOURCE2} >> unified.conf
e06f5d7
touch -c -r %{SOURCE1} unified.conf
5d80787
install -D -p -m 644 unified.conf $RPM_BUILD_ROOT%{_httpd_confdir}/geoip.conf
b3f6f0d
%else
5d80787
# httpd >= 2.4.x
e06f5d7
install -D -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_httpd_modconfdir}/10-geoip.conf
e06f5d7
install -D -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_httpd_confdir}/geoip.conf
b3f6f0d
%endif
b3f6f0d
Michael Fleming ccf734c
%clean
5d80787
rm -rf $RPM_BUILD_ROOT
Michael Fleming ccf734c
Michael Fleming ccf734c
%files
5d80787
%defattr(-,root,root,-)
e06f5d7
%{!?_licensedir:%global license %%doc}
e06f5d7
%license LICENSE
e06f5d7
%doc Changes INSTALL.md README.*
5d80787
%{_httpd_moddir}/%{name}.so
5d80787
%config(noreplace) %{_httpd_confdir}/geoip.conf
b3f6f0d
%if "%{_httpd_modconfdir}" != "%{_httpd_confdir}"
5d80787
%config(noreplace) %{_httpd_modconfdir}/10-geoip.conf
b3f6f0d
%endif
Michael Fleming ccf734c
Michael Fleming ccf734c
%changelog
447ea9d
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-6
447ea9d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
447ea9d
40fc0c1
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-5
40fc0c1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
40fc0c1
81ba8f6
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-4
81ba8f6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
81ba8f6
a3fd11e
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.10-3
a3fd11e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
a3fd11e
4fa1ff7
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.10-2
4fa1ff7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
4fa1ff7
e06f5d7
* Thu Apr 23 2015 Robert Scheck <robert@fedoraproject.org> 1.2.10-1
e06f5d7
- Upgrade to 1.2.10 (#1214493)
e06f5d7
375d73c
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-6
375d73c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
375d73c
91e8909
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-5
91e8909
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
91e8909
1d8eb7b
* Thu Jan 23 2014 Joe Orton <jorton@redhat.com> - 1.2.7-4
1d8eb7b
- fix _httpd_mmn expansion in absence of httpd-devel
1d8eb7b
c93e53a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-3
c93e53a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c93e53a
0c1d590
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-2
0c1d590
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
0c1d590
5d80787
* Sat Nov 17 2012 Robert Scheck <robert@fedoraproject.org> 1.2.7-1
5d80787
- Upgrade to 1.2.7
5d80787
- Updated spec file to match with Apache 2.4 policy (#809698)
5d80787
0005fe0
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-9
0005fe0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
0005fe0
5c9a6e9
* Mon Apr 16 2012 Joe Orton <jorton@redhat.com> - 1.2.5-8
5c9a6e9
- fix config perms
5c9a6e9
b3f6f0d
* Wed Apr 04 2012 Jan Kaluza <jkaluza@redhat.com> - 1.2.5-7
b3f6f0d
- Fix compilation error with httpd-2.4 (#809698)
b3f6f0d
7b1f976
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-6
7b1f976
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
7b1f976
360122d
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-5
360122d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
360122d
7b2578f
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-4
7b2578f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
7b2578f
fa184a2
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.5-3
fa184a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
fa184a2
Michael Fleming e28ea3f
* Fri Aug 29 2008 Michael Fleming <mfleming+rpm@enlartenment.com> - 1.2.5-2
Michael Fleming e28ea3f
- Update setup macro
Michael Fleming e28ea3f
Michael Fleming 23eb055
* Fri Aug 29 2008 Michael Fleming <mfleming+rpm@enlartenment.com> - 1.2.5-1
Michael Fleming 23eb055
- Update to 1.2.5
Michael Fleming 23eb055
d813cd7
* Mon Aug 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.2.4-3
d813cd7
- fix license tag
d813cd7
Michael Fleming a504da9
* Fri Jun 20 2008 Michael Fleming <mfleming+rpm@enlartenment.com> 1.2.4-2
Michael Fleming c4d047f
- New upstream update
Michael Fleming a504da9
- Minor spec tweaks
Michael Fleming c4d047f
Michael Fleming 619e169
* Sun Apr 13 2008 Michael Fleming <mfleming+rpm@enlartenment.com> 1.2.2-1
Michael Fleming 619e169
- New upstream update
Michael Fleming 619e169
4bf9349
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.2.0-2
4bf9349
- Autorebuild for GCC 4.3
4bf9349
Michael Fleming 0b0b07b
* Wed Sep 5 2007 Michael Fleming <mfleming+rpm@enlartenment.com> 1.2.0-1
Michael Fleming 0b0b07b
- New upstream release
Michael Fleming 0b0b07b
- Employ some macro sanity..
Michael Fleming 0b0b07b
Michael Fleming 92cfaad
* Sun Sep 3 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.1.8-2
Michael Fleming 92cfaad
- Bump and rebuild
Michael Fleming 92cfaad
Michael Fleming da137ff
* Mon May 1 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.1.8-1
Michael Fleming da137ff
- New upstream release
Michael Fleming da137ff
Michael Fleming ccf734c
* Sat Feb 18 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.1.7-2
Michael Fleming ccf734c
- Small cleanups, including a saner Requires: for httpd
Michael Fleming ccf734c
- Don't strip the binary
Michael Fleming ccf734c
Michael Fleming ccf734c
* Sun Feb 5 2006 Michael Fleming <mfleming+rpm@enlartenment.com> 1.1.7-1
Michael Fleming ccf734c
- Initial review package for Extras