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.12
Release:        0
Summary:        Library to find the country that any IP address originates from
License:        GPL-2.0-or-later AND LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
URL:            https://www.maxmind.com/
Source0:        https://github.com/maxmind/geoip-api-c/releases/download/v%{version}/%{realname}-%{version}.tar.gz
#Patch0:         GeoIP-1.5.1-shlibs.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem >= 26
BuildRequires:  mingw64-zlib-devel
%_mingw64_package_header_debug
#!BuildIgnore:  post-build-checks
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-or-later
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-or-later
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}
%autopatch -p1

%build
autoreconf -fiv
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}

%install
%{_mingw64_makeinstall}
install -Dpm644 data/GeoIP.dat %{buildroot}%{_mingw64_datadir}/GeoIP/GeoIP.dat

%files
%{_mingw64_bindir}/geoiplookup.exe
%{_mingw64_bindir}/geoiplookup6.exe
%{_mingw64_datadir}/GeoIP/GeoIP.dat
%{_mingw64_mandir}/man1/geoiplookup.1%{?ext_man}
%{_mingw64_mandir}/man1/geoiplookup6.1%{?ext_man}

%files -n mingw64-libGeoIP1
%{_mingw64_bindir}/libGeoIP-1.dll

%files devel
%{_mingw64_includedir}/GeoIP.h
%{_mingw64_includedir}/GeoIPCity.h
%{_mingw64_libdir}/libGeoIP.dll.a
%{_mingw64_libdir}/pkgconfig/geoip.pc

%changelog
openSUSE Build Service is sponsored by