File mingw64-geoip.spec of Package mingw64-geoip

#
# spec file for package mingw64-geoip
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define realname GeoIP
Name:           mingw64-geoip
Version:        1.6.9
Release:        0
Summary:        Library to find the country that any IP address originates from
License:        GPL-2.0+ and LGPL-2.1+
Group:          Development/Libraries/C and C++
Url:            http://www.maxmind.com/
Source0:        http://www.maxmind.com/download/geoip/api/c/%{realname}-%{version}.tar.gz
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
#!BuildIgnore: post-build-checks
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem >= 26
BuildRequires:  mingw64-zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%_mingw64_package_header_debug
BuildArch:      noarch

%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.
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.

MaxMind offers a service where you can have your database updated
automically each month.

%package -n mingw64-libGeoIP1
Summary:        Shared libraries of the GeoIP C API
License:        LGPL-2.1+
Group:          System/Libraries

%description -n mingw64-libGeoIP1
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.

%package devel
Summary:        Development files for the GeoIP C API
License:        LGPL-2.1+
Group:          Development/Libraries/C and C++

%description 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.
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.

MaxMind offers a service where you can have your database updated
automically each month.

This package holds the development files for GeoIP.

%_mingw64_debug_package

%prep
%setup -q -n %{realname}-%{version}

%build
libtoolize --force --copy --install
autoreconf -fi
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
echo "ac_cv_func_malloc_0_nonnull=yes" >>%{_mingw64_cache}
echo "ac_cv_func_realloc_0_nonnull=yes" >>%{_mingw64_cache}
%{_mingw64_configure} --enable-shared --disable-static LDFLAGS="-lws2_32"
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}

%install
%{_mingw64_makeinstall}
mkdir -p %{buildroot}%{_mingw64_mandir}/man1

%files
%defattr(-,root,root)
%{_mingw64_bindir}/*.exe
# No longer installed.
# Should this be handled by an as-yet-unwritten GeoIP-GeoLite-data.spec?
#%{_mingw64_prefix}/data/GeoIP/GeoIP.dat

%files -n mingw64-libGeoIP1
%defattr(-,root,root)
%{_mingw64_bindir}/libGeoIP-1.dll

%files devel
%defattr(-,root,root)
%{_mingw64_mandir}/man1/geoip*
%{_mingw64_libdir}/libGeoIP.dll.a
%{_mingw64_libdir}/pkgconfig/geoip.pc
%{_mingw64_includedir}/*.h

%changelog