%define name geoip %define oname GeoIP %define major 1 %define updatemajor 0 %define libname %mklibname %name %major %define libname1 %mklibname geoipupdate %updatemajor Summary: Find what country an IP address or hostname originates from Name: %{name} Version: 1.4.0 Release: %mkrel 2 License: LGPL Group: System/Libraries URL: http://www.maxmind.com/app/c Source0: http://www.maxmind.com/download/geoip/api/c/%{oname}-%{version}.tar.bz2 Source1: http://www.maxmind.com/download/geoip/database/GeoIP.dat.bz2 BuildRequires: zlib-devel BuildRequires: libtool BuildRequires: autoconf2.5 BuildRoot: %{_tmppath}/%{name}-buildroot %description GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from. It uses a file based database that is accurate as of March 2003. This database simply contains IP blocks as keys, and countries as values. This database should be more complete and accurate than using reverse DNS lookups. Commercial databases and automatic update services are available from http://www.maxmind.com/ This module can be used to automatically select the geographically closest mirror, to analyze your web server logs to determine the countries of your visitors, for credit card fraud detection, and for software export controls. %package -n %{libname} Summary: Shared library part of GeoIP Group: System/Libraries Requires: %name >= %{version} %description -n %{libname} GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from. It uses a file based database that is accurate as of March 2003. This database simply contains IP blocks as keys, and countries as values. This database should be more complete and accurate than using reverse DNS lookups. Commercial databases and automatic update services are available from http://www.maxmind.com/ This module can be used to automatically select the geographically closest mirror, to analyze your web server logs to determine the countries of your visitors, for credit card fraud detection, and for software export controls. %package -n %{libname1} Summary: Shared library parts of GeoIP Group: System/Libraries %description -n %{libname1} GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from. It uses a file based database that is accurate as of March 2003. This database simply contains IP blocks as keys, and countries as values. This database should be more complete and accurate than using reverse DNS lookups. Commercial databases and automatic update services are available from http://www.maxmind.com/ This module can be used to automatically select the geographically closest mirror, to analyze your web server logs to determine the countries of your visitors, for credit card fraud detection, and for software export controls. %package -n %{libname}-devel Summary: Headers and libraries needed for GeoIP development Group: Development/C Requires: %{libname} = %{version} Requires: %{libname1} = %{version} Provides: lib%{name}-devel = %{version} Provides: %{oname}-devel = %{version} %description -n %{libname}-devel GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from. It uses a file based database that is accurate as of March 2003. This database simply contains IP blocks as keys, and countries as values. This database should be more complete and accurate than using reverse DNS lookups. Commercial databases and automatic update services are available from http://www.maxmind.com/ This module can be used to automatically select the geographically closest mirror, to analyze your web server logs to determine the countries of your visitors, for credit card fraud detection, and for software export controls. %prep %setup -q -n %oname-%{version} bzcat %{SOURCE1} > data/GeoIP.dat %build rm -rf configure autom4te.cache libtoolize --copy --force; aclocal; automake --gnu --add-missing --copy; autoconf %configure2_5x %make #gw disable tests if there's no network if ping -c 1 www.mandriva.com; then make check fi %install rm -rf %{buildroot} %makeinstall %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %post -n %{libname1} -p /sbin/ldconfig %postun -n %{libname1} -p /sbin/ldconfig %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog README TODO %config(noreplace) %{_sysconfdir}/GeoIP.conf %config(noreplace) %{_sysconfdir}/GeoIP.conf.default %{_bindir}/geoiplookup %{_bindir}/geoipupdate %dir %{_datadir}/GeoIP/ %{_datadir}/GeoIP/GeoIP.dat %{_datadir}/man/man1/geoiplookup.1* %{_datadir}/man/man1/geoipupdate.1* %files -n %{libname} %defattr(-,root,root) %{_libdir}/libGeoIP.so.%{major}* %files -n %{libname1} %defattr(-,root,root) %{_libdir}/libGeoIPUpdate.so.%{updatemajor}* %files -n %{libname}-devel %defattr(-,root,root) %{_libdir}/lib*.so %{_libdir}/lib*.la %{_libdir}/lib*.a %{_includedir}/* %changelog * Mon Aug 28 2006 Götz Waschk <waschk@mandriva.org> 1.4.0-2mdv2007.0 - spec fix * Wed Aug 23 2006 Oden Eriksson <oeriksson@mandriva.com> 1.4.0-1mdv2007.0 - 1.4.0 - new S1 * Thu Jul 27 2006 Oden Eriksson <oeriksson@mandriva.com> 1.3.17-1mdv2007.0 - 1.3.17 - new S1 * Thu Jul 20 2006 Götz Waschk <waschk@mandriva.org> 1.3.8-4mdk - Rebuild * Mon Jan 16 2006 Götz Waschk <waschk@mandriva.org> 1.3.8-3mdk - fix build without network * Tue Jan 03 2006 Götz Waschk <waschk@mandriva.org> 1.3.8-2mdk - Rebuild - use mkrel * Sun Jan 2 2005 Frederic Lepied <flepied@mandrakesoft.com> 1.3.8-1mdk - New release 1.3.8 * Mon Sep 27 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.3.6-2mdk - updated data * Tue Aug 17 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.3.6-1mdk - New release 1.3.6 * Mon May 10 2004 Goetz Waschk <waschk@linux-mandrake.com> 1.3.2-1mdk - New release 1.3.2 * Thu Feb 19 2004 Götz Waschk <waschk@linux-mandrake.com> 1.3.1-1mdk - new version * Thu Aug 28 2003 Götz Waschk <waschk@linux-mandrake.com> 1.2.2-2mdk - fix buildrequires * Wed Aug 20 2003 Götz Waschk <waschk@linux-mandrake.com> 1.2.2-1mdk - initial package