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.

93 lines
2.2 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. # This Makefile for ZeroMQ
  8. #
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=zeromq
  11. PKG_VERSION:=4.1.3
  12. PKG_RELEASE:=1
  13. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  14. PKG_LICENSE:=GPL-3.0+
  15. PKG_LICENSE_FILES:=LICENCE.txt
  16. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  17. PKG_SOURCE_URL:= http://download.zeromq.org
  18. PKG_MD5SUM:=d0824317348cfb44b8692e19cc73dc3a
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. PKG_BUILD_DEPENDS:=libuuid
  21. PKG_FIXUP:=autoreconf
  22. PKG_INSTALL:=1
  23. include $(INCLUDE_DIR)/uclibc++.mk
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/libzmq/default
  26. TITLE:=ZeroMQ - Message Queue engine
  27. URL:=http://www.zeromq.org/
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. DEPENDS:=+libuuid +libpthread +librt $(CXX_DEPENDS)
  31. PROVIDES:=libzmq
  32. endef
  33. define Package/libzmq-nc
  34. $(call Package/libzmq/default)
  35. VARIANT:=nc
  36. endef
  37. define Package/libzmq-curve
  38. $(call Package/libzmq/default)
  39. VARIANT:=curve
  40. TITLE+= (CurveZMQ)
  41. DEPENDS+=+libsodium
  42. endef
  43. define Package/libzmq-nc/description
  44. This package contains the ZeroMQ messaging engine shared library.
  45. endef
  46. define Package/libzmq-curve/description
  47. $(call Package/libzmq-nc/description)
  48. Includes CurveZMQ security by libsodium.
  49. endef
  50. # add extra configure flags here
  51. CONFIGURE_ARGS += \
  52. --enable-static \
  53. --enable-shared
  54. ifeq ($(BUILD_VARIANT),curve)
  55. CONFIGURE_ARGS+= --with-libsodium
  56. else
  57. CONFIGURE_ARGS+= --without-libsodium
  58. endif
  59. define Build/InstallDev
  60. $(INSTALL_DIR) $(1)/usr/include
  61. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include
  62. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq_utils.h $(1)/usr/include
  63. $(INSTALL_DIR) $(1)/usr/lib
  64. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.{a,so*} $(1)/usr/lib/
  65. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  66. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libzmq.pc $(1)/usr/lib/pkgconfig/
  67. endef
  68. define Package/libzmq-nc/install
  69. $(INSTALL_DIR) $(1)/usr/lib
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.so.* $(1)/usr/lib/
  71. endef
  72. Package/libzmq-curve/install=$(Package/libzmq-nc/install)
  73. $(eval $(call BuildPackage,libzmq-nc))
  74. $(eval $(call BuildPackage,libzmq-curve))