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.

103 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2016 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.7
  12. PKG_RELEASE:=2
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  14. PKG_SOURCE_URL:=https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION)
  15. PKG_HASH:=31c383cfcd3be1dc8a66e448c403029e793687e70473b89c4cc0bd626e7da299
  16. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  17. PKG_LICENSE:=GPL-3.0-or-later
  18. PKG_LICENSE_FILES:=LICENCE.txt
  19. PKG_CPE_ID:=cpe:/a:zeromq:libzmq
  20. PKG_BUILD_PARALLEL:=1
  21. CMAKE_BINARY_SUBDIR:=openwrt-build
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/cmake.mk
  24. define Package/libzmq/default
  25. TITLE:=ZeroMQ - Message Queue engine
  26. URL:=http://www.zeromq.org/
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. DEPENDS:=+libuuid +libpthread +librt +libstdcpp
  30. PROVIDES:=libzmq
  31. endef
  32. define Package/libzmq-nc
  33. $(call Package/libzmq/default)
  34. VARIANT:=nc
  35. endef
  36. define Package/libzmq-curve
  37. $(call Package/libzmq/default)
  38. VARIANT:=curve
  39. TITLE+= (CurveZMQ)
  40. DEPENDS+=+libsodium
  41. endef
  42. define Package/libzmq-nc/description
  43. This package contains the ZeroMQ messaging engine shared library.
  44. endef
  45. define Package/libzmq-curve/description
  46. $(call Package/libzmq-nc/description)
  47. Includes CurveZMQ security by libsodium.
  48. endef
  49. CMAKE_OPTIONS += \
  50. -DA2X_EXECUTABLE=OFF \
  51. -DASCIIDOC_EXECUTABLE=OFF \
  52. -DCMAKE_SKIP_INSTALL_RPATH=ON \
  53. -DZMQ_HAVE_SOCK_CLOEXEC=ON \
  54. -DZMQ_HAVE_SO_KEEPALIVE=ON \
  55. -DZMQ_HAVE_TCP_KEEPCNT=ON \
  56. -DZMQ_HAVE_TCP_KEEPIDLE=ON \
  57. -DZMQ_HAVE_TCP_KEEPINTVL=ON \
  58. -DZMQ_HAVE_TCP_KEEPALIVE=ON \
  59. -DENABLE_CURVE=ON \
  60. -DENABLE_EVENTFD=ON \
  61. -DPOLLER=epoll \
  62. -DPYTHON_EXECUTABLE=OFF \
  63. -DRT_LIBRARY=OFF \
  64. -DWITH_OPENPGM=OFF \
  65. -DZMQ_BUILD_TESTS=OFF
  66. ifeq ($(BUILD_VARIANT),curve)
  67. CMAKE_OPTIONS += -DWITH_LIBSODIUM=ON
  68. else
  69. CMAKE_OPTIONS += -DWITH_LIBSODIUM=OFF
  70. endif
  71. define Build/InstallDev
  72. $(INSTALL_DIR) $(1)/usr/include
  73. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include
  74. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq_utils.h $(1)/usr/include
  75. $(INSTALL_DIR) $(1)/usr/lib
  76. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.so* $(1)/usr/lib/
  77. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libzmq.pc $(1)/usr/lib/pkgconfig/
  79. endef
  80. define Package/libzmq-nc/install
  81. $(INSTALL_DIR) $(1)/usr/lib
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.so $(1)/usr/lib/
  83. endef
  84. Package/libzmq-curve/install=$(Package/libzmq-nc/install)
  85. $(eval $(call BuildPackage,libzmq-nc))
  86. $(eval $(call BuildPackage,libzmq-curve))