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.

96 lines
2.4 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_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  17. PKG_MAINTAINER:=Dirk Chang <dirk@kooiot.com>
  18. PKG_LICENSE:=GPL-3.0-or-later
  19. PKG_LICENSE_FILES:=LICENCE.txt
  20. PKG_CPE_ID:=cpe:/a:zeromq:libzmq
  21. PKG_INSTALL:=1
  22. PKG_BUILD_PARALLEL:=1
  23. PKG_REMOVE_FILES:=autogen.sh acinclude.m4 aclocal.m4
  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 +libstdcpp
  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. --with-pic \
  55. --with-relaxed \
  56. --without-documentation
  57. ifeq ($(BUILD_VARIANT),curve)
  58. CONFIGURE_ARGS+= --with-libsodium
  59. else
  60. CONFIGURE_ARGS+= --without-libsodium
  61. endif
  62. TARGET_CXXFLAGS += -Wno-error=cpp
  63. define Build/InstallDev
  64. $(INSTALL_DIR) $(1)/usr/include
  65. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include
  66. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq_utils.h $(1)/usr/include
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.{a,so*} $(1)/usr/lib/
  69. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libzmq.pc $(1)/usr/lib/pkgconfig/
  71. endef
  72. define Package/libzmq-nc/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.so.* $(1)/usr/lib/
  75. endef
  76. Package/libzmq-curve/install=$(Package/libzmq-nc/install)
  77. $(eval $(call BuildPackage,libzmq-nc))
  78. $(eval $(call BuildPackage,libzmq-curve))