Browse code

Add c-ares for libcares library

Change-Id: If0f2ff46072d3bd832026b81e20010f7465b0a07
Reviewed-on: http://photon-jenkins.eng.vmware.com/501
Tested-by: jenkins-photon <wangnan2015@hotmail.com>
Reviewed-by: suezzelur <anishs@vmware.com>

suezzelur authored on 2016/02/04 19:26:50
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
0
+Summary: 	A library that performs asynchronous DNS operations
1
+Name: 		c-ares
2
+Version: 	1.10.0
3
+Release: 	1%{?dist}
4
+License: 	MIT
5
+Group: 		System Environment/Libraries
6
+Vendor:		VMware, Inc.
7
+Distribution:	Photon
8
+URL: 		http://c-ares.haxx.se/
9
+Source0: 	http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz
10
+%define sha1 c-ares=e44e6575d5af99cb3a38461486e1ee8b49810eb5
11
+
12
+BuildRequires:  autoconf
13
+BuildRequires:  automake
14
+BuildRequires:  libtool
15
+
16
+%description
17
+c-ares is a C library that performs DNS requests and name resolves 
18
+asynchronously. c-ares is a fork of the library named 'ares', written 
19
+by Greg Hudson at MIT.
20
+
21
+%package devel
22
+Summary: Development files for c-ares
23
+Group: Development/Libraries
24
+Requires: %{name} = %{version}-%{release}
25
+Requires: pkg-config
26
+
27
+%description devel
28
+This package contains the header files and libraries needed to
29
+compile applications or shared objects that use c-ares.
30
+
31
+%prep
32
+%setup -q
33
+
34
+f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f
35
+
36
+%build
37
+autoreconf -if
38
+%configure --enable-shared --disable-static \
39
+           --disable-dependency-tracking
40
+%{__make} %{?_smp_mflags}
41
+
42
+%install
43
+rm -rf $RPM_BUILD_ROOT
44
+make DESTDIR=$RPM_BUILD_ROOT install
45
+rm -f $RPM_BUILD_ROOT/%{_libdir}/libcares.la
46
+
47
+%clean
48
+rm -rf $RPM_BUILD_ROOT
49
+
50
+%post -p /sbin/ldconfig
51
+%postun -p /sbin/ldconfig
52
+
53
+%files
54
+%defattr(-, root, root)
55
+%doc README README.cares CHANGES NEWS
56
+%{_libdir}/*.so.*
57
+
58
+%files devel
59
+%defattr(-, root, root, 0755)
60
+%{_includedir}/ares.h
61
+%{_includedir}/ares_build.h
62
+%{_includedir}/ares_dns.h
63
+%{_includedir}/ares_rules.h
64
+%{_includedir}/ares_version.h
65
+%{_libdir}/*.so
66
+%{_libdir}/pkgconfig/libcares.pc
67
+%{_mandir}/man3/ares_*
68
+
69
+%changelog
70
+* Wed Feb 03 2016 Anish Swaminathan <anishs@vmware.com> - 1.10.0-1
71
+- Initial version
... ...
@@ -56,6 +56,7 @@
56 56
         "gawk",
57 57
 	"irqbalance",
58 58
         "lvm2",
59
-        "cifs-utils"
59
+        "cifs-utils",
60
+        "c-ares"
60 61
     ]
61 62
 }
... ...
@@ -28,7 +28,7 @@
28 28
                 "libtirpc", "libtirpc-devel", "lsof", "nfs-utils", "cve-check-tool", "flannel", "rpm-build", "dkms", "openssl-perl", "openssl-c_rehash", "xinetd", "tftp", "tftp-server",
29 29
                 "audit","audit-devel","libcap-ng","libcap-ng-devel","tcp_wrappers","tcp_wrappers-devel", "apr-util-devel", "apr-util-ldap", 
30 30
                 "apr-util-pgsql", "apr-util-sqlite","openjre", "sshpass", "openjdk-src", "openjdk-sample", "openjdk-doc", "e2fsprogs-devel", "haproxy","libcap-devel",
31
-		"cython","python-lxml","python-pycparser","python-cffi","python-cryptography","cifs-utils","cifs-utils-devel","python-curses"]
31
+		"cython","python-lxml","python-pycparser","python-cffi","python-cryptography","cifs-utils","cifs-utils-devel","python-curses","c-ares","c-ares-devel"]
32 32
 }
33 33
 
34 34