1
0

Makefile 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=c-ares
  10. PKG_VERSION:=1.19.1
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://c-ares.org/download
  14. PKG_HASH:=321700399b72ed0e037d0074c629e7741f6b2ec2dda92956abe3e9671d3e268e
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE.md
  17. PKG_CPE_ID:=cpe:/a:c-ares_project:c-ares
  18. CMAKE_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/libcares
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=Library for asyncronous DNS Requests (including name resolves)
  25. URL:=http://c-ares.haxx.se/
  26. MAINTAINER:=Karl Palsson <karlp@etactica.com>
  27. endef
  28. define Package/libcares/description
  29. c-ares is a C library for asynchronous DNS requests (including name resolves)
  30. C89 compatibility, MIT licensed, builds for and runs on POSIX, Windows,
  31. Netware, Android and many more operating systems.
  32. endef
  33. CMAKE_OPTIONS += \
  34. -DCARES_STATIC=OFF \
  35. -DCARES_SHARED=ON \
  36. -DCARES_STATIC_PIC=ON \
  37. -DCARES_BUILD_TESTS=OFF \
  38. -DCARES_BUILD_TOOLS=OFF
  39. define Build/InstallDev
  40. $(call Build/InstallDev/cmake,$(1))
  41. $(SED) 's,/usr/bin,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcares.pc
  42. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libcares.pc
  43. $(SED) 's,/usr/lib,$$$${prefix}/lib,g' $(1)/usr/lib/pkgconfig/libcares.pc
  44. endef
  45. define Package/libcares/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcares.so.* $(1)/usr/lib/
  48. endef
  49. $(eval $(call BuildPackage,libcares))