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.

95 lines
2.3 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_INSTALL:=1
  21. PKG_BUILD_PARALLEL:=1
  22. PKG_REMOVE_FILES:=autogen.sh acinclude.m4 aclocal.m4
  23. include $(INCLUDE_DIR)/package.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. # add extra configure flags here
  50. CONFIGURE_ARGS += \
  51. --enable-static \
  52. --enable-shared \
  53. --with-pic \
  54. --with-relaxed \
  55. --without-documentation
  56. ifeq ($(BUILD_VARIANT),curve)
  57. CONFIGURE_ARGS+= --with-libsodium
  58. else
  59. CONFIGURE_ARGS+= --without-libsodium
  60. endif
  61. TARGET_CXXFLAGS += -Wno-error=cpp
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include
  65. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq_utils.h $(1)/usr/include
  66. $(INSTALL_DIR) $(1)/usr/lib
  67. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.{a,so*} $(1)/usr/lib/
  68. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libzmq.pc $(1)/usr/lib/pkgconfig/
  70. endef
  71. define Package/libzmq-nc/install
  72. $(INSTALL_DIR) $(1)/usr/lib
  73. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.so.* $(1)/usr/lib/
  74. endef
  75. Package/libzmq-curve/install=$(Package/libzmq-nc/install)
  76. $(eval $(call BuildPackage,libzmq-nc))
  77. $(eval $(call BuildPackage,libzmq-curve))