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.

65 lines
1.5 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_RELEASE:=3
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/obgm/libcoap
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)
  13. PKG_SOURCE_VERSION:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
  15. PKG_MIRROR_HASH:=b61fe3245a329dfcf198187149d2072509b18ca6e348d0b423c0f44d11e930e4
  16. PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  17. PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
  18. PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  20. PKG_FIXUP:=autoreconf
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/libcoap
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=CoAP (RFC 7252) library
  27. URL:=http://libcoap.net/
  28. endef
  29. define Package/libcoap/description
  30. Constrained Application Protocol (RFC 7252) library
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. CONFIGURE_ARGS += \
  34. --disable-examples \
  35. --disable-documentation
  36. ifeq ($(CONFIG_BIG_ENDIAN),y)
  37. TARGET_CFLAGS += -DWORDS_BIGENDIAN
  38. endif
  39. define Build/InstallDev
  40. $(INSTALL_DIR) $(1)/usr/include
  41. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  44. endef
  45. define Package/libcoap/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
  48. endef
  49. $(eval $(call BuildPackage,libcoap))