Created
February 1, 2015 08:12
-
-
Save siavashs/0ffa053c63e11f711f3e to your computer and use it in GitHub Desktop.
ip2location C library rpm SPEC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: ip2location-c | |
Version: 7.0.0 | |
Release: 1%{?dist} | |
Summary: IP2Location C Library | |
Group: Development/Libraries | |
License: GPLv3+ | |
URL: http://www.ip2location.com/c.aspx | |
Source0: http://www.ip2location.com/downloads/%{name}-%{version}.tar.gz | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
BuildRequires: autoconf libtool gcc perl | |
%description | |
IP2Location is a C library that enables the user to find the country, region, | |
city, latitude, longitude, zip code, time zone, ISP, domain name, connection | |
type, area code, weather, mobile network, elevation, usage type by IP address | |
or hostname originates from. | |
%package devel | |
Summary: IP2Location C Library Development files | |
Requires: %{name}%{?_isa} = %{version}-%{release} | |
%description devel | |
IP2Location is a C library that enables the user to find the country, region, | |
city, latitude, longitude, zip code, time zone, ISP, domain name, connection | |
type, area code, weather, mobile network, elevation, usage type by IP address | |
or hostname originates from. | |
%package data | |
Summary: IP2Location C Library Sample Data files | |
Requires: %{name}%{?_isa} = %{version}-%{release} | |
%description data | |
IP2Location is a C library that enables the user to find the country, region, | |
city, latitude, longitude, zip code, time zone, ISP, domain name, connection | |
type, area code, weather, mobile network, elevation, usage type by IP address | |
or hostname originates from. | |
%prep | |
%setup -q | |
%build | |
autoreconf -if | |
libtoolize -if | |
%configure | |
make %{?_smp_mflags} | |
cd data | |
make convert | |
%install | |
rm -rf %{buildroot} | |
make install-strip DESTDIR=%{buildroot} | |
cd data | |
make install DESTDIR=%{buildroot} | |
%clean | |
rm -rf %{buildroot} | |
%files | |
%defattr(-,root,root,-) | |
%{_libdir}/*.so.* | |
%{_libdir}/libIP2Location.la | |
%files devel | |
%defattr(-,root,root) | |
%{_includedir}/*.h | |
%{_libdir}/*.a | |
%{_libdir}/*.la | |
%{_libdir}/*.so | |
%files data | |
%defattr(-,root,root) | |
%{_datadir}/IP2Loc | |
%post -p /sbin/ldconfig | |
%postun -p /sbin/ldconfig | |
%changelog | |
* Sat Jan 31 2015 Siavash Safi<[email protected]> - 7.0.0-1 | |
- Initial package created. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment