You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libcoap
  9. PKG_VERSION:=4.2.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/obgm/libcoap/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=9523e38da6ee8b2a8f5ce83ded64107dd1e514c7ad00cd74ccfe3454b679c271
  14. PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  15. PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
  16. PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/libcoap
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=CoAP (RFC 7252) library
  25. URL:=https://libcoap.net/
  26. ABI_VERSION:=2
  27. endef
  28. define Package/libcoap/description
  29. Constrained Application Protocol (RFC 7252) library
  30. endef
  31. define Package/coap-client
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. DEPENDS:=+libcoap
  35. TITLE:=CoAP (RFC 7252) client tool
  36. endef
  37. define Package/coap-client/description
  38. Constrained Application Protocol (RFC7252) client tool
  39. endef
  40. define Package/coap-server
  41. SECTION:=net
  42. CATEGORY:=Network
  43. DEPENDS:=+libcoap
  44. TITLE:=CoAP (RFC 7252) server programs
  45. endef
  46. define Package/coap-server/description
  47. Constrained Application Protocol (RFC 7252) server and resource directory server
  48. endef
  49. TARGET_CFLAGS += $(FPIC)
  50. CONFIGURE_ARGS += \
  51. --enable-examples \
  52. --disable-documentation \
  53. --disable-doxygen \
  54. --disable-dtls \
  55. --disable-gcov \
  56. --disable-tests
  57. define Build/InstallDev
  58. $(INSTALL_DIR) $(1)/usr/include
  59. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  62. endef
  63. define Package/libcoap/install
  64. $(INSTALL_DIR) $(1)/usr/lib
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-$(ABI_VERSION).so* $(1)/usr/lib/
  66. endef
  67. define Package/coap-client/install
  68. $(INSTALL_DIR) $(1)/usr/bin
  69. $(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-client $(1)/usr/bin/
  70. endef
  71. define Package/coap-server/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-server $(1)/usr/bin/
  74. $(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-rd $(1)/usr/bin/
  75. endef
  76. $(eval $(call BuildPackage,libcoap))
  77. $(eval $(call BuildPackage,coap-client))
  78. $(eval $(call BuildPackage,coap-server))