]>
Commit | Line | Data |
---|---|---|
b5a72a95 JP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static library | |
4 | ||
fb176567 | 5 | Summary: A library that performs asynchronous DNS operations |
d0f05923 | 6 | Summary(pl.UTF-8): Biblioteka do wykonywania asynchronicznych zapytań DNS |
fb176567 | 7 | Name: c-ares |
b318083b | 8 | Version: 1.30.0 |
9a225e6a | 9 | Release: 1 |
fb176567 AG |
10 | License: MIT |
11 | Group: Libraries | |
b318083b JB |
12 | #Source0Download: https://c-ares.org/download/ |
13 | Source0: https://github.com/c-ares/c-ares/releases/download/v%{version}/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: 0f8c35dceae19ac98ce86f4ef9ca5819 | |
5122b158 | 15 | Patch0: %{name}-resolv.conf-reading-is-not-fatal.patch |
a2383a5a | 16 | URL: https://c-ares.org/ |
1c92226e | 17 | BuildRequires: autoconf >= 2.69 |
05725522 JB |
18 | BuildRequires: automake >= 1:1.9.6 |
19 | # for tests | |
b318083b | 20 | #BuildRequires: gmock-devel |
a2383a5a | 21 | #BuildRequires: libstdc++-devel >= 6:5 |
05725522 | 22 | BuildRequires: libtool >= 2:2 |
b5a72a95 | 23 | BuildRequires: rpmbuild(macros) >= 1.527 |
fb176567 AG |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
26 | %description | |
27 | c-ares is a C library that performs DNS requests and name resolves | |
28 | asynchronously. c-ares is a fork of the library named 'ares', written | |
29 | by Greg Hudson at MIT. | |
30 | ||
166ca016 JR |
31 | %description -l pl.UTF-8 |
32 | c-ares jest napisaną w C biblioteką do asynchronicznego wykonywania | |
33 | zapytań DNS. c-ares jest to fork biblioteki 'ares' napisanej przez | |
fb176567 AG |
34 | Grega Hudsona w MIT. |
35 | ||
36 | %package devel | |
37 | Summary: Development files for c-ares library | |
d0f05923 | 38 | Summary(pl.UTF-8): Pliki nagłówkowe dla biblioteki c-ares |
fb176567 AG |
39 | Group: Development/Libraries |
40 | Requires: %{name} = %{version}-%{release} | |
41 | ||
42 | %description devel | |
43 | Header files for c-ares library. | |
44 | ||
166ca016 JR |
45 | %description devel -l pl.UTF-8 |
46 | Pliki nagłówkowe biblioteki c-ares. | |
fb176567 AG |
47 | |
48 | %package static | |
49 | Summary: Static c-ares library | |
d0f05923 | 50 | Summary(pl.UTF-8): Statyczna biblioteka c-ares |
fb176567 AG |
51 | Group: Development/Libraries |
52 | Requires: %{name}-devel = %{version}-%{release} | |
53 | ||
54 | %description static | |
55 | Static c-ares library. | |
56 | ||
166ca016 | 57 | %description static -l pl.UTF-8 |
fb176567 AG |
58 | Statyczna biblioteka c-ares. |
59 | ||
60 | %prep | |
d522fb60 | 61 | %setup -q |
5122b158 | 62 | %patch0 -p1 |
fb176567 AG |
63 | |
64 | %build | |
cce9c713 ER |
65 | %{__libtoolize} |
66 | %{__aclocal} -I m4 | |
05725522 | 67 | %{__autoconf} |
bf3cdf8b | 68 | %{__autoheader} |
05725522 | 69 | %{__automake} |
fb176567 | 70 | %configure \ |
cb743bc9 | 71 | --disable-silent-rules \ |
b5a72a95 | 72 | %{__enable_disable static_libs static} \ |
ce141f84 | 73 | --disable-tests \ |
fb176567 AG |
74 | --enable-shared |
75 | ||
76 | %{__make} | |
77 | ||
78 | %install | |
79 | rm -rf $RPM_BUILD_ROOT | |
05725522 | 80 | |
fb176567 AG |
81 | %{__make} install \ |
82 | DESTDIR=$RPM_BUILD_ROOT | |
83 | ||
05725522 JB |
84 | # no external dependencies + obsoleted by pkg-config |
85 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcares.la | |
86 | ||
fb176567 AG |
87 | %clean |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
0bea12c2 JB |
90 | %post -p /sbin/ldconfig |
91 | %postun -p /sbin/ldconfig | |
fb176567 AG |
92 | |
93 | %files | |
94 | %defattr(644,root,root,755) | |
b318083b | 95 | %doc AUTHORS CHANGES LICENSE.md NEWS README.cares README.md RELEASE-NOTES.md SECURITY.md TODO |
cce9c713 ER |
96 | %attr(755,root,root) %{_libdir}/libcares.so.*.*.* |
97 | %attr(755,root,root) %ghost %{_libdir}/libcares.so.2 | |
fb176567 AG |
98 | |
99 | %files devel | |
100 | %defattr(644,root,root,755) | |
777ebe8a | 101 | %attr(755,root,root) %{_libdir}/libcares.so |
b43df78b ER |
102 | %{_includedir}/ares.h |
103 | %{_includedir}/ares_build.h | |
104 | %{_includedir}/ares_dns.h | |
8ffc0698 | 105 | %{_includedir}/ares_dns_record.h |
f701d35f | 106 | %{_includedir}/ares_nameser.h |
b43df78b ER |
107 | %{_includedir}/ares_rules.h |
108 | %{_includedir}/ares_version.h | |
cce9c713 ER |
109 | %{_mandir}/man3/ares_*.3* |
110 | %{_pkgconfigdir}/libcares.pc | |
fb176567 | 111 | |
b5a72a95 | 112 | %if %{with static_libs} |
fb176567 AG |
113 | %files static |
114 | %defattr(644,root,root,755) | |
cce9c713 | 115 | %{_libdir}/libcares.a |
b5a72a95 | 116 | %endif |