]>
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 |
219d6607 | 8 | Version: 1.24.0 |
9a225e6a | 9 | Release: 1 |
fb176567 AG |
10 | License: MIT |
11 | Group: Libraries | |
232d5587 | 12 | #Source0Download: https://c-ares.haxx.se/ |
1c79e49f | 13 | Source0: https://c-ares.haxx.se/download/%{name}-%{version}.tar.gz |
219d6607 | 14 | # Source0-md5: 25b872ee1c3bee8ff5f49b5f31307002 |
5122b158 | 15 | Patch0: %{name}-resolv.conf-reading-is-not-fatal.patch |
1c79e49f | 16 | URL: https://c-ares.haxx.se/ |
01c35988 | 17 | BuildRequires: autoconf >= 2.60 |
05725522 JB |
18 | BuildRequires: automake >= 1:1.9.6 |
19 | # for tests | |
20 | #BuildRequires: libstdc++-devel >= 6:4.7 | |
21 | BuildRequires: libtool >= 2:2 | |
b5a72a95 | 22 | BuildRequires: rpmbuild(macros) >= 1.527 |
cce9c713 | 23 | BuildRequires: sed >= 4.0 |
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 | 63 | |
cce9c713 | 64 | # we want our own debug flags, if any |
cb743bc9 JB |
65 | %{__sed} -i -e 's/flags_dbg_off=".*"/flags_dbg_off="%{rpmcflags}"/' m4/cares-compilers.m4 |
66 | %{__sed} -i -e 's/flags_opt_yes=".*"/flags_opt_yes="%{rpmcflags}"/' m4/cares-compilers.m4 | |
cce9c713 | 67 | |
fb176567 | 68 | %build |
cce9c713 ER |
69 | %{__libtoolize} |
70 | %{__aclocal} -I m4 | |
05725522 | 71 | %{__autoconf} |
bf3cdf8b | 72 | %{__autoheader} |
05725522 JB |
73 | %{__automake} |
74 | cd test | |
75 | %{__libtoolize} | |
76 | %{__aclocal} -I ../m4 | |
cce9c713 | 77 | %{__autoconf} |
05725522 | 78 | %{__autoheader} |
cce9c713 | 79 | %{__automake} |
05725522 | 80 | cd .. |
fb176567 | 81 | %configure \ |
cb743bc9 | 82 | --disable-silent-rules \ |
b5a72a95 | 83 | %{__enable_disable static_libs static} \ |
ce141f84 | 84 | --disable-tests \ |
cce9c713 | 85 | --enable-optimize="%{rpmcflags}" \ |
fb176567 AG |
86 | --enable-shared |
87 | ||
88 | %{__make} | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
05725522 | 92 | |
fb176567 AG |
93 | %{__make} install \ |
94 | DESTDIR=$RPM_BUILD_ROOT | |
95 | ||
05725522 JB |
96 | # no external dependencies + obsoleted by pkg-config |
97 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcares.la | |
98 | ||
fb176567 AG |
99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
0bea12c2 JB |
102 | %post -p /sbin/ldconfig |
103 | %postun -p /sbin/ldconfig | |
fb176567 AG |
104 | |
105 | %files | |
106 | %defattr(644,root,root,755) | |
1c79e49f | 107 | %doc AUTHORS CHANGES LICENSE.md NEWS README.cares README.md RELEASE-NOTES TODO |
cce9c713 ER |
108 | %attr(755,root,root) %{_libdir}/libcares.so.*.*.* |
109 | %attr(755,root,root) %ghost %{_libdir}/libcares.so.2 | |
fb176567 AG |
110 | |
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
777ebe8a | 113 | %attr(755,root,root) %{_libdir}/libcares.so |
b43df78b ER |
114 | %{_includedir}/ares.h |
115 | %{_includedir}/ares_build.h | |
116 | %{_includedir}/ares_dns.h | |
8ffc0698 | 117 | %{_includedir}/ares_dns_record.h |
f701d35f | 118 | %{_includedir}/ares_nameser.h |
b43df78b ER |
119 | %{_includedir}/ares_rules.h |
120 | %{_includedir}/ares_version.h | |
cce9c713 ER |
121 | %{_mandir}/man3/ares_*.3* |
122 | %{_pkgconfigdir}/libcares.pc | |
fb176567 | 123 | |
b5a72a95 | 124 | %if %{with static_libs} |
fb176567 AG |
125 | %files static |
126 | %defattr(644,root,root,755) | |
cce9c713 | 127 | %{_libdir}/libcares.a |
b5a72a95 | 128 | %endif |