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