3 %bcond_without static_libs # don't build static libraries
4 %bcond_without tests # build without tests
6 Summary: Library for working with MaxMind DB files
12 Source0: https://github.com/maxmind/libmaxminddb/releases/download/%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: 4ee5932468c308b7e7a3780f7550d713
14 URL: http://maxmind.github.io/libmaxminddb/
16 BuildRequires: perl(Test::More) >= 0.88
17 BuildRequires: perl-IPC-Run3
18 BuildRequires: perl-Test-Output
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 The libmaxminddb library provides a C library for reading MaxMind DB
24 files, including the GeoIP2 databases from MaxMind. This is a custom
25 binary format designed to facilitate fast lookups of IP addresses
26 while allowing for great flexibility in the type of data associated
30 Summary: Header files for %{name} library
31 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
32 Group: Development/Libraries
33 Requires: %{name} = %{version}-%{release}
36 Header files for %{name} library.
38 %description devel -l pl.UTF-8
39 Pliki nagłówkowe biblioteki %{name}.
42 Summary: Static %{name} library
43 Summary(pl.UTF-8): Statyczna biblioteka %{name}
44 Group: Development/Libraries
45 Requires: %{name}-devel = %{version}-%{release}
48 Static %{name} library.
50 %description static -l pl.UTF-8
51 Statyczna biblioteka %{name}.
58 %{!?with_static_libs:--disable-static}
60 %{?with_tests:%{__make} check}
63 rm -rf $RPM_BUILD_ROOT
65 DESTDIR=$RPM_BUILD_ROOT
68 rm -rf $RPM_BUILD_ROOT
70 %post -p /sbin/ldconfig
71 %postun -p /sbin/ldconfig
74 %defattr(644,root,root,755)
75 %attr(755,root,root) %{_bindir}/mmdblookup
76 %attr(755,root,root) %{_libdir}/libmaxminddb.so.*.*.*
77 %attr(755,root,root) %ghost %{_libdir}/libmaxminddb.so.0
80 %defattr(644,root,root,755)
81 %doc doc/libmaxminddb.md
82 %attr(755,root,root) %{_libdir}/%{name}.so
83 %{_includedir}/maxminddb.h
84 %{_includedir}/maxminddb_config.h
85 %{_libdir}/libmaxminddb.la
86 %{_mandir}/man3/MMDB_*.3
87 %{_mandir}/man3/libmaxminddb.3*
89 %if %{with static_libs}
91 %defattr(644,root,root,755)
92 %{_libdir}/libmaxminddb.a