]>
Commit | Line | Data |
---|---|---|
3a546792 ER |
1 | # |
2 | # Conditional build: | |
aeaf840f | 3 | %bcond_without static_libs # static library |
0615b330 | 4 | %bcond_without tests # build without tests |
3a546792 ER |
5 | |
6 | Summary: Library for working with MaxMind DB files | |
aeaf840f | 7 | Summary(pl.UTF-8): BIblioteka do pracy z plikami MaxMind DB |
3a546792 | 8 | Name: libmaxminddb |
aeaf840f JB |
9 | Version: 1.2.0 |
10 | Release: 1 | |
11 | License: Apache v2.0 | |
3a546792 | 12 | Group: Libraries |
aeaf840f | 13 | #Source0Download: https://github.com/maxmind/libmaxminddb/releases |
3a546792 | 14 | Source0: https://github.com/maxmind/libmaxminddb/releases/download/%{version}/%{name}-%{version}.tar.gz |
aeaf840f | 15 | # Source0-md5: fae9021779dffe1b87f038d21f8afd56 |
3a546792 | 16 | URL: http://maxmind.github.io/libmaxminddb/ |
5cd9f679 | 17 | %if %{with tests} |
5cd9f679 ER |
18 | BuildRequires: perl-IPC-Run3 |
19 | BuildRequires: perl-Test-Output | |
aeaf840f | 20 | BuildRequires: perl-Test-Simple >= 0.88 |
5cd9f679 | 21 | %endif |
aeaf840f | 22 | BuildRequires: pkgconfig |
3a546792 ER |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
24 | ||
25 | %description | |
5cd9f679 ER |
26 | The libmaxminddb library provides a C library for reading MaxMind DB |
27 | files, including the GeoIP2 databases from MaxMind. This is a custom | |
28 | binary format designed to facilitate fast lookups of IP addresses | |
29 | while allowing for great flexibility in the type of data associated | |
30 | with an address. | |
3a546792 | 31 | |
aeaf840f JB |
32 | %description -l pl.UTF-8 |
33 | Biblioteka libmaxminddb jest biblioteką C do odczytu plików MaxMind | |
34 | DB, zawierających bazy danych GeoIP2 firmy MaxMind. Jest to własny | |
35 | format binarny zaprojektowany z myślą o szybkim wyszukiwaniu adresów | |
36 | IP i dużej elastyczności typu danych powiązanych z adresem. | |
37 | ||
3a546792 ER |
38 | %package devel |
39 | Summary: Header files for %{name} library | |
40 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
41 | Group: Development/Libraries | |
42 | Requires: %{name} = %{version}-%{release} | |
43 | ||
44 | %description devel | |
45 | Header files for %{name} library. | |
46 | ||
47 | %description devel -l pl.UTF-8 | |
48 | Pliki nagłówkowe biblioteki %{name}. | |
49 | ||
50 | %package static | |
51 | Summary: Static %{name} library | |
52 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
53 | Group: Development/Libraries | |
54 | Requires: %{name}-devel = %{version}-%{release} | |
55 | ||
56 | %description static | |
57 | Static %{name} library. | |
58 | ||
59 | %description static -l pl.UTF-8 | |
60 | Statyczna biblioteka %{name}. | |
61 | ||
62 | %prep | |
63 | %setup -q | |
64 | ||
65 | %build | |
66 | %configure \ | |
67 | %{!?with_static_libs:--disable-static} | |
68 | %{__make} | |
aeaf840f | 69 | |
0615b330 | 70 | %{?with_tests:%{__make} check} |
3a546792 ER |
71 | |
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
aeaf840f | 74 | |
3a546792 ER |
75 | %{__make} install \ |
76 | DESTDIR=$RPM_BUILD_ROOT | |
77 | ||
aeaf840f JB |
78 | # obsoleted by pkg-config |
79 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmaxminddb.la | |
80 | ||
3a546792 ER |
81 | %clean |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | %post -p /sbin/ldconfig | |
85 | %postun -p /sbin/ldconfig | |
86 | ||
87 | %files | |
88 | %defattr(644,root,root,755) | |
aeaf840f | 89 | %doc Changes.md NOTICE README.md |
3a546792 ER |
90 | %attr(755,root,root) %{_bindir}/mmdblookup |
91 | %attr(755,root,root) %{_libdir}/libmaxminddb.so.*.*.* | |
92 | %attr(755,root,root) %ghost %{_libdir}/libmaxminddb.so.0 | |
aeaf840f | 93 | %{_mandir}/man1/mmdblookup.1* |
3a546792 ER |
94 | |
95 | %files devel | |
96 | %defattr(644,root,root,755) | |
aeaf840f | 97 | %attr(755,root,root) %{_libdir}/libmaxminddb.so |
3a546792 ER |
98 | %{_includedir}/maxminddb.h |
99 | %{_includedir}/maxminddb_config.h | |
aeaf840f | 100 | %{_pkgconfigdir}/libmaxminddb.pc |
3a546792 ER |
101 | %{_mandir}/man3/MMDB_*.3 |
102 | %{_mandir}/man3/libmaxminddb.3* | |
103 | ||
104 | %if %{with static_libs} | |
105 | %files static | |
106 | %defattr(644,root,root,755) | |
107 | %{_libdir}/libmaxminddb.a | |
108 | %endif |