f4a2a9414705bc37d13d0989c99ac7d5f5f9d2b3
[feed/packages.git] / libs / c-ares / Makefile
1 #
2 # Copyright (C) 2009-2010 OpenWrt.org
3 # Copyright (C) 2009 Jakob Pfeiffer
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=c-ares
12 PKG_VERSION:=1.27.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://c-ares.org/download
17 PKG_HASH:=0a72be66959955c43e2af2fbd03418e82a2bd5464604ec9a62147e37aceb420b
18
19 PKG_LICENSE:=MIT
20 PKG_LICENSE_FILES:=LICENSE.md
21 PKG_CPE_ID:=cpe:/a:c-ares_project:c-ares
22
23 CMAKE_INSTALL:=1
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/cmake.mk
27
28 define Package/libcares
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=Library for asyncronous DNS Requests (including name resolves)
32 URL:=https://c-ares.org/
33 MAINTAINER:=Karl Palsson <karlp@etactica.com>
34 endef
35
36 define Package/libcares/description
37 c-ares is a C library for asynchronous DNS requests (including name resolves)
38
39 C89 compatibility, MIT licensed, builds for and runs on POSIX, Windows,
40 Netware, Android and many more operating systems.
41
42 endef
43
44 CMAKE_OPTIONS += \
45 -DCARES_STATIC_PIC=ON \
46 -DCARES_BUILD_TOOLS=OFF
47
48 define Build/InstallDev
49 $(call Build/InstallDev/cmake,$(1))
50 $(SED) 's,/usr/bin,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcares.pc
51 $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libcares.pc
52 $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcares.pc
53 endef
54
55 define Package/libcares/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcares.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,libcares))