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.

64 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:=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_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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libcoap
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=CoAP (RFC 7252) library
  26. URL:=http://libcoap.net/
  27. endef
  28. define Package/libcoap/description
  29. Constrained Application Protocol (RFC 7252) library
  30. endef
  31. TARGET_CFLAGS += $(FPIC)
  32. CONFIGURE_ARGS += \
  33. --disable-examples \
  34. --disable-documentation
  35. ifeq ($(CONFIG_BIG_ENDIAN),y)
  36. TARGET_CFLAGS += -DWORDS_BIGENDIAN
  37. endif
  38. define Build/InstallDev
  39. $(INSTALL_DIR) $(1)/usr/include
  40. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  43. endef
  44. define Package/libcoap/install
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
  47. endef
  48. $(eval $(call BuildPackage,libcoap))