3 %bcond_without static_libs # static library
5 Summary: A library that performs asynchronous DNS operations
6 Summary(pl.UTF-8): Biblioteka do wykonywania asynchronicznych zapytań DNS
12 #Source0Download: https://c-ares.haxx.se/
13 Source0: https://c-ares.haxx.se/download/%{name}-%{version}.tar.gz
14 # Source0-md5: 0f9e7f16ddb6526e202e5e45b39253c7
15 Patch0: %{name}-resolv.conf-reading-is-not-fatal.patch
16 URL: https://c-ares.haxx.se/
17 BuildRequires: autoconf >= 2.60
18 BuildRequires: automake >= 1:1.9.6
20 #BuildRequires: libstdc++-devel >= 6:4.7
21 BuildRequires: libtool >= 2:2
22 BuildRequires: rpmbuild(macros) >= 1.527
23 BuildRequires: sed >= 4.0
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
37 Summary: Development files for c-ares library
38 Summary(pl.UTF-8): Pliki nagłówkowe dla biblioteki c-ares
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
43 Header files for c-ares library.
45 %description devel -l pl.UTF-8
46 Pliki nagłówkowe biblioteki c-ares.
49 Summary: Static c-ares library
50 Summary(pl.UTF-8): Statyczna biblioteka c-ares
51 Group: Development/Libraries
52 Requires: %{name}-devel = %{version}-%{release}
55 Static c-ares library.
57 %description static -l pl.UTF-8
58 Statyczna biblioteka c-ares.
64 # we want our own debug flags, if any
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
82 --disable-silent-rules \
83 %{__enable_disable static_libs static} \
85 --enable-optimize="%{rpmcflags}" \
91 rm -rf $RPM_BUILD_ROOT
94 DESTDIR=$RPM_BUILD_ROOT
96 # no external dependencies + obsoleted by pkg-config
97 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libcares.la
100 rm -rf $RPM_BUILD_ROOT
102 %post -p /sbin/ldconfig
103 %postun -p /sbin/ldconfig
106 %defattr(644,root,root,755)
107 %doc AUTHORS CHANGES LICENSE.md NEWS README.cares README.md RELEASE-NOTES TODO
108 %attr(755,root,root) %{_libdir}/libcares.so.*.*.*
109 %attr(755,root,root) %ghost %{_libdir}/libcares.so.2
112 %defattr(644,root,root,755)
113 %attr(755,root,root) %{_libdir}/libcares.so
114 %{_includedir}/ares.h
115 %{_includedir}/ares_build.h
116 %{_includedir}/ares_dns.h
117 %{_includedir}/ares_dns_record.h
118 %{_includedir}/ares_nameser.h
119 %{_includedir}/ares_rules.h
120 %{_includedir}/ares_version.h
121 %{_mandir}/man3/ares_*.3*
122 %{_pkgconfigdir}/libcares.pc
124 %if %{with static_libs}
126 %defattr(644,root,root,755)
127 %{_libdir}/libcares.a