%define name geoip %define oname GeoIP %define version 1.3.8 %define release 1mdk %define major 1 %define major1 0 %define libname %mklibname %name %major %define libname1 %mklibname geoipupdate %major1 Summary: Find what country an IP address or hostname originates from Name: %{name} Version: %{version} Release: %{release} 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 License: GPL Group: System/Libraries BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: zlib-devel %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 Group: System/Libraries Summary: Shared library part of GeoIP 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 Group: System/Libraries Summary: Shared library parts of GeoIP %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 Group: Development/C Summary: Headers and libraries needed for GeoIP development 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 %build %configure %make make check %install rm -rf $RPM_BUILD_ROOT %makeinstall bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_datadir}/GeoIP/GeoIP.dat %clean rm -rf $RPM_BUILD_ROOT %post -n %libname -p /sbin/ldconfig %postun -n %libname -p /sbin/ldconfig %post -n %libname1 -p /sbin/ldconfig %postun -n %libname1 -p /sbin/ldconfig %files %defattr(-,root,root) %doc AUTHORS COPYING ChangeLog README TODO %config(noreplace) %{_sysconfdir}/GeoIP.conf %config(noreplace) %{_sysconfdir}/GeoIP.conf.default %{_bindir}/geoipexport %{_bindir}/geoipexportlocations %{_bindir}/geoiplookup %{_bindir}/geoipupdate %dir %{_datadir}/GeoIP/ %{_datadir}/GeoIP/GeoIP.dat %{_datadir}/man/man1/geoiplookup.1.bz2 %{_datadir}/man/man1/geoipupdate.1.bz2 %files -n %libname %defattr(-,root,root) %_libdir/libGeoIP.so.* %files -n %libname1 %defattr(-,root,root) %_libdir/libGeoIPBitReader.so.* %_libdir/libGeoIPUpdate.so.* %files -n %libname-devel %defattr(-,root,root) %_libdir/lib*.so %_libdir/lib*.la %_libdir/lib*.a %_includedir/* %changelog * 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