From cad188b2412fd50854d79e6b9626f3ed52a1843d Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sep 11 2020 06:54:44 +0000 Subject: use latest sources, git commit 9a987645663b2e13191072df9d8866bf65bc85f5 add subpackage data-sample including the generated BIN files --- diff --git a/.gitignore b/.gitignore index d1f1f93..7b1cbb3 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /IP2Location-8.0.9.tar.gz +/IP2Location-9a987645663b2e13191072df9d8866bf65bc85f5.tar.gz diff --git a/IP2Location.spec b/IP2Location.spec index cb60a69..2c34714 100644 --- a/IP2Location.spec +++ b/IP2Location.spec @@ -1,14 +1,27 @@ %define version 8.0.9 +# enable the following for intermediate builds +%define gitcommit 9a987645663b2e13191072df9d8866bf65bc85f5 + +%if 0%{?gitcommit:1} +%global shortcommit %(c=%{gitcommit}; echo ${c:0:7}) +%define 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 Version: %{version} -Release: 6%{?dist} +Release: 7%{?gittag}%{?dist} License: MIT URL: http://www.ip2location.com/ +%if 0%{?gitcommit:1} +Source0: https://github.com/chrislim2888/IP2Location-C-Library/archive/%{gitcommit}/%{name}-%{gitcommit}.tar.gz +%else Source0: https://github.com/chrislim2888/IP2Location-C-Library/archive/%{version}/%{name}-%{version}.tar.gz Patch0: IP2Location-8.0.9-adebc0ef.patch Patch1: IP2Location-8.0.9-rpmlint.patch +%endif BuildRequires: libtool BuildRequires: perl(Math::BigInt) @@ -26,7 +39,7 @@ the included downloader. %package devel -Summary: Static library and header files for the ip2location library +Summary: Static library and header files for the IP2Location library Requires: %{name} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} @@ -41,10 +54,31 @@ commercial binary databases. This package contains the development files for the IP2Location library. +%package data-sample +Summary: Sample data files for the IP2Location library +Requires: %{name} = %{version}-%{release} + +%description data-sample +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. + +This package contains the sample data files for testing the library. + +Latest lite databases can be downloaded from https://lite.ip2location.com + + %prep +%if 0%{?gitcommit:1} +%setup -q -n IP2Location-C-Library-%{gitcommit} +%else %setup -q -n IP2Location-C-Library-%{version} %patch0 -p1 %patch1 -p1 +%endif # remove a warning option which break configure on older gcc versions # (at least gcc version 4.1.2 20080704) @@ -78,6 +112,8 @@ install -pm 0755 tools/download.pl %{buildroot}%{_datadir}/%{name}/tools # database directory install -d %{buildroot}%{_datadir}/%{name}/ +install -p data/IP-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/ +install -p data/IPV6-COUNTRY.BIN %{buildroot}%{_datadir}/%{name}/ %files @@ -100,7 +136,15 @@ install -d %{buildroot}%{_datadir}/%{name}/ %doc Developers_Guide.txt +%files data-sample +%{_datadir}/%{name}/*.BIN + + %changelog +* Fri Sep 11 2020 Peter Bieringer - 8.0.9-7 +- use latest sources, git commit 9a987645663b2e13191072df9d8866bf65bc85f5 +- add subpackage data-sample including the generated BIN files + * Tue Sep 08 2020 Peter Bieringer - 8.0.9-6 - add patch to sync with upstream - add patch to make rpmlint happy diff --git a/sources b/sources index 7f8a120..afa1fdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (IP2Location-8.0.9.tar.gz) = b12052aab4bfa273ef3201c78f05ee1f96e7d08f57917d4062c18b7b1897b6419c52d9a123fc8db3187c1e0ae272a5f7c49117f657fea739a29c10439780acfd +SHA512 (IP2Location-9a987645663b2e13191072df9d8866bf65bc85f5.tar.gz) = 20339aad1e785b89dda47c3d46a925f3024e49dae651e9a06a77783bf1e26d274b2288de291d9bb19385f38ee45cae876e1c35564788af0d1a1cb8610f347683