diff --git a/.gitignore b/.gitignore index 4e6b0c2..6e469a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +clog /IP2Location-8.0.9.tar.gz /IP2Location-9a987645663b2e13191072df9d8866bf65bc85f5.tar.gz /IP2Location-6e49424dfc998856fa790df498bf77520e72ca28.tar.gz diff --git a/IP2Location.spec b/IP2Location.spec index 62686a7..ceb91a1 100644 --- a/IP2Location.spec +++ b/IP2Location.spec @@ -1,19 +1,19 @@ -%define version 8.3.1 -%define soname 3 +%global version 8.3.1 +%global soname 3 # enable the following for intermediate builds -#define gitcommit 7b074becd59cf8c574190e49ce097640a2cfefd7 +#global gitcommit 7b074becd59cf8c574190e49ce097640a2cfefd7 %if 0%{?gitcommit:1} %global shortcommit %(c=%{gitcommit}; echo ${c:0:7}) -%define build_timestamp %(date +"%Y%m%d") +%global build_timestamp %(date +"%Y%m%d") %global gittag .%{build_timestamp}git%{shortcommit} %endif Name: IP2Location -Summary: C library for mapping IP address to geolocation information +Summary: Tools for mapping IP address to geolocation information Version: %{version} -Release: 3%{?gittag}%{?dist} +Release: 4%{?gittag}%{?dist} License: MIT URL: http://www.ip2location.com/ %if 0%{?gitcommit:1} @@ -29,10 +29,11 @@ BuildRequires: automake Obsoletes: libip2location < %{version} Provides: libip2location = %{version} +Requires: %{name}-libs%{_isa} = %{version}-%{release} %description -IP2Location C library enables the user to get the country, region, city, +ip2location command enables the user to get the country, region, city, coordinates, ZIP code, time zone, ISP, domain name, connection type, area code, weather info, mobile carrier, elevation and usage type from any IP address or hostname. This library has been optimized for speed and memory @@ -43,10 +44,24 @@ Users can download the latest LITE database from IP2Location web site using e.g. the included downloader. +%package libs +Summary: C library for mapping IP address to geolocation information +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Recommends: %{name}%{_isa} = %{version}-%{release} +%endif + +%description libs +IP2Location C library enables the user to get the country, region, city, +coordinates, ZIP code, time zone, ISP, domain name, connection type, +area code, weather info, mobile carrier, elevation and usage type from any IP +address or hostname. This library has been optimized for speed and memory +utilization. The library contains API to query all IP2Location LITE and +commercial binary databases. + + %package devel -Summary: Static library and header files for the IP2Location library -Requires: %{name} = %{version}-%{release} -Provides: %{name}-devel = %{version}-%{release} +Summary: Development files for the IP2Location library +Requires: %{name}%{_isa} = %{version}-%{release} Obsoletes: libip2location-devel < %{version} Provides: libip2location-devel = %{version} @@ -134,35 +149,34 @@ install -p data/IPV6-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/IPV6-COUNTRY.SA %files -%license COPYING LICENSE.TXT - %doc AUTHORS ChangeLog README.md NEWS +%{_datadir}/%{name}/tools/ +%{_bindir}/ip2location +%{_mandir}/man1/ip2location.1* + +%files libs +%license COPYING LICENSE.TXT %{_libdir}/libIP2Location.so.%{soname} %{_libdir}/libIP2Location.so.%{soname}.0.0 - -%{_datadir}/%{name}/tools/ - %dir %{_datadir}/%{name}/ -%attr(755,-,-) %{_bindir}/* - -%{_mandir}/man1/* - %files devel +%doc Developers_Guide.txt %{_includedir}/IP2Loc*.h %{_libdir}/libIP2Location.so -%doc Developers_Guide.txt - %files data-sample %attr(644,-,-) %{_datadir}/%{name}/*.BIN %changelog -* Mon Nov 09 2020 Peter Bieringer - 8.3.1-1 +* Mon Nov 9 2020 Remi Collet - 8.3.1-4 +- move library in libs subpackage + +* Mon Nov 09 2020 Peter Bieringer - 8.3.1-3 - update to 8.3.1 * Sat Nov 07 2020 Peter Bieringer - 8.3.0-2