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.

62 lines
1.4 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:=2
  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_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  16. PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
  17. PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=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:=http://libcoap.net/
  26. endef
  27. define Package/libcoap/description
  28. Constrained Application Protocol (RFC 7252) library
  29. endef
  30. TARGET_CFLAGS += $(FPIC)
  31. CONFIGURE_ARGS += \
  32. --disable-examples \
  33. --disable-documentation
  34. ifeq ($(CONFIG_BIG_ENDIAN),y)
  35. TARGET_CFLAGS += -DWORDS_BIGENDIAN
  36. endif
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  42. endef
  43. define Package/libcoap/install
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
  46. endef
  47. $(eval $(call BuildPackage,libcoap))