ALT Linux repositórios
Group :: Sistema/Bibliotecas
RPM: libGeoIP
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
%define origname GeoIP
%def_disable static
Name: lib%{origname}
Version: 1.4.4
Release: alt1
Summary: GeoIP is a C library find what country an IP address or hostname originates from
License: LGPLv2.1+
Group: System/Libraries
URL: http://www.maxmind.com/app/c
Source: http://www.maxmind.com/download/geoip/api/c/%origname-%version.tar.gz
# Automatically added by buildreq on Fri Jul 20 2007
BuildRequires: zlib-devel
# Both library and lookup tools unusable without database. But user can choose
# to get this file directly from MaxMind site, without installing our packaged
# GeoIP database. Hence this is file rather than package requirement.
Requires: /usr/share/GeoIP/GeoIP.dat
%description
%origname 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 devel
Summary: GeoIP headers, libraries
Group: Development/C
Requires: %name = %version-%release
%description devel
%origname is a C library that enables the user to find the country that
any IP address or hostname originates from.
This package contain the devel files for %origname.
%if_enabled static
%package devel-static
Summary: GeoIP static libraries
Group: Development/C
Requires: %name = %version-%release
%description devel-static
%origname is a C library that enables the user to find the country that any IP
address or hostname originates from.
This package contain static libraries for %origname.
%endif
%package tools
Summary: GeoIP tools
Group: System/Libraries
Requires: %name = %version-%release
%description tools
%origname is a C library that enables the user to find the country that
any IP address or hostname originates from.
This package contain few tools for %origname such as lookup, export,
autoupdate.
%prep
%setup -n %origname-%version
%build
%configure %{subst_enable static}
%make_build
make check
%install
%make_install DESTDIR=%buildroot install
%post -p %post_ldconfig
%postun -p %postun_ldconfig
%files
%doc AUTHORS ChangeLog TODO
%config(noreplace) %_sysconfdir/GeoIP.conf
%exclude %_sysconfdir/GeoIP.conf.default
%_libdir/*.so.*
# GeoIP databases updated way more often than library itself. So we will not
# package DB files
%exclude %_datadir/%origname
%files devel
%_includedir/*
%_libdir/*.so
%if_enabled static
%files devel-static
%_libdir/*.a
%endif
%files tools
%_bindir/*
%_man1dir/*
%changelog
…
Todas as alterações você pod ver aqui
%def_disable static
Name: lib%{origname}
Version: 1.4.4
Release: alt1
Summary: GeoIP is a C library find what country an IP address or hostname originates from
License: LGPLv2.1+
Group: System/Libraries
URL: http://www.maxmind.com/app/c
Source: http://www.maxmind.com/download/geoip/api/c/%origname-%version.tar.gz
# Automatically added by buildreq on Fri Jul 20 2007
BuildRequires: zlib-devel
# Both library and lookup tools unusable without database. But user can choose
# to get this file directly from MaxMind site, without installing our packaged
# GeoIP database. Hence this is file rather than package requirement.
Requires: /usr/share/GeoIP/GeoIP.dat
%description
%origname 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 devel
Summary: GeoIP headers, libraries
Group: Development/C
Requires: %name = %version-%release
%description devel
%origname is a C library that enables the user to find the country that
any IP address or hostname originates from.
This package contain the devel files for %origname.
%if_enabled static
%package devel-static
Summary: GeoIP static libraries
Group: Development/C
Requires: %name = %version-%release
%description devel-static
%origname is a C library that enables the user to find the country that any IP
address or hostname originates from.
This package contain static libraries for %origname.
%endif
%package tools
Summary: GeoIP tools
Group: System/Libraries
Requires: %name = %version-%release
%description tools
%origname is a C library that enables the user to find the country that
any IP address or hostname originates from.
This package contain few tools for %origname such as lookup, export,
autoupdate.
%prep
%setup -n %origname-%version
%build
%configure %{subst_enable static}
%make_build
make check
%install
%make_install DESTDIR=%buildroot install
%post -p %post_ldconfig
%postun -p %postun_ldconfig
%files
%doc AUTHORS ChangeLog TODO
%config(noreplace) %_sysconfdir/GeoIP.conf
%exclude %_sysconfdir/GeoIP.conf.default
%_libdir/*.so.*
# GeoIP databases updated way more often than library itself. So we will not
# package DB files
%exclude %_datadir/%origname
%files devel
%_includedir/*
%_libdir/*.so
%if_enabled static
%files devel-static
%_libdir/*.a
%endif
%files tools
%_bindir/*
%_man1dir/*
%changelog
…
Todas as alterações você pod ver aqui