Change the upstream source URL
[platform/upstream/c-ares.git] / packaging / c-ares.spec
1 Name:           c-ares
2 Version:        1.17.1
3 Release:        0
4 License:        MIT
5 Summary:        Library for asynchronous name resolves
6 Group:          Development/Libraries/C and C++
7 Source:         http://daniel.haxx.se/projects/c-ares/%{name}-%{version}.tar.gz
8 Source2:        baselibs.conf
9 Source1001:     c-ares.manifest
10 Source1002:     LICENSE
11 BuildRequires:  pkg-config
12 BuildRequires:  libtool
13 Url:            http://daniel.haxx.se/projects/c-ares
14
15 %description
16 c-ares is a C library that performs DNS requests and name resolves
17 asynchronously. c-ares is a fork of the library named 'ares', written
18 by Greg Hudson at MIT.
19
20 %package -n libcares
21 Summary:        Library for asynchronous name resolves
22 Group:          Development/Libraries/C and C++
23
24 %description -n libcares
25 c-ares is a C library that performs DNS requests and name resolves
26 asynchronously. c-ares is a fork of the library named 'ares', written
27 by Greg Hudson at MIT.
28
29 %package -n libcares-devel
30 Summary:        Library for asynchronous name resolves
31 Group:          Development/Libraries/C and C++
32 Requires:       libcares = %{version}
33 Requires:       glibc-devel
34
35 %description -n libcares-devel
36 c-ares is a C library that performs DNS requests and name resolves
37 asynchronously. c-ares is a fork of the library named 'ares', written
38 by Greg Hudson at MIT.
39
40 %prep
41 %setup -q -n %{name}-%{version}
42 cp %{SOURCE1001} .
43 cp %{SOURCE1002} .
44
45 %build
46 autoreconf -fiv
47 %configure --enable-symbol-hiding --enable-nonblocking --enable-shared --disable-static --with-pic --disable-tests
48 sed -i -e 's@-g0@-g@g' Makefile
49 make %{?_smp_mflags}
50
51 %install
52 %make_install
53
54 %post -p /sbin/ldconfig -n libcares
55
56 %postun -p /sbin/ldconfig -n libcares
57
58 %files -n libcares
59 %license LICENSE
60 %manifest %{name}.manifest
61 %defattr(-,root,root)
62 %{_libdir}/libcares.so.2*
63
64 %files -n libcares-devel
65 %license LICENSE
66 %manifest %{name}.manifest
67 %defattr(-,root,root)
68 %{_libdir}/libcares.so
69 %{_includedir}/*.h
70 %{_mandir}/man3/ares_*
71 %{_libdir}/pkgconfig/libcares.pc