]> git.pld-linux.org Git - packages/c-ares.git/blame - c-ares.spec
up to 1.24.0
[packages/c-ares.git] / c-ares.spec
CommitLineData
b5a72a95
JP
1#
2# Conditional build:
3%bcond_without static_libs # static library
4
fb176567 5Summary: A library that performs asynchronous DNS operations
d0f05923 6Summary(pl.UTF-8): Biblioteka do wykonywania asynchronicznych zapytań DNS
fb176567 7Name: c-ares
219d6607 8Version: 1.24.0
9a225e6a 9Release: 1
fb176567
AG
10License: MIT
11Group: Libraries
232d5587 12#Source0Download: https://c-ares.haxx.se/
1c79e49f 13Source0: https://c-ares.haxx.se/download/%{name}-%{version}.tar.gz
219d6607 14# Source0-md5: 25b872ee1c3bee8ff5f49b5f31307002
5122b158 15Patch0: %{name}-resolv.conf-reading-is-not-fatal.patch
1c79e49f 16URL: https://c-ares.haxx.se/
01c35988 17BuildRequires: autoconf >= 2.60
05725522
JB
18BuildRequires: automake >= 1:1.9.6
19# for tests
20#BuildRequires: libstdc++-devel >= 6:4.7
21BuildRequires: libtool >= 2:2
b5a72a95 22BuildRequires: rpmbuild(macros) >= 1.527
cce9c713 23BuildRequires: sed >= 4.0
fb176567
AG
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%description
27c-ares is a C library that performs DNS requests and name resolves
28asynchronously. c-ares is a fork of the library named 'ares', written
29by Greg Hudson at MIT.
30
166ca016
JR
31%description -l pl.UTF-8
32c-ares jest napisaną w C biblioteką do asynchronicznego wykonywania
33zapytań DNS. c-ares jest to fork biblioteki 'ares' napisanej przez
fb176567
AG
34Grega Hudsona w MIT.
35
36%package devel
37Summary: Development files for c-ares library
d0f05923 38Summary(pl.UTF-8): Pliki nagłówkowe dla biblioteki c-ares
fb176567
AG
39Group: Development/Libraries
40Requires: %{name} = %{version}-%{release}
41
42%description devel
43Header files for c-ares library.
44
166ca016
JR
45%description devel -l pl.UTF-8
46Pliki nagłówkowe biblioteki c-ares.
fb176567
AG
47
48%package static
49Summary: Static c-ares library
d0f05923 50Summary(pl.UTF-8): Statyczna biblioteka c-ares
fb176567
AG
51Group: Development/Libraries
52Requires: %{name}-devel = %{version}-%{release}
53
54%description static
55Static c-ares library.
56
166ca016 57%description static -l pl.UTF-8
fb176567
AG
58Statyczna 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}
74cd test
75%{__libtoolize}
76%{__aclocal} -I ../m4
cce9c713 77%{__autoconf}
05725522 78%{__autoheader}
cce9c713 79%{__automake}
05725522 80cd ..
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
91rm -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
100rm -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
This page took 0.350553 seconds and 4 git commands to generate.