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.

92 lines
2.2 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.6
  12. PKG_RELEASE:=2
  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:=https://github.com/zeromq/zeromq4-1/releases/download/v$(PKG_VERSION)
  18. PKG_HASH:=02ebf60a43011e770799336365bcbce2eb85569e9b5f52aa0d8cc04672438a0a
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. PKG_FIXUP:=autoreconf
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/uclibc++.mk
  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 $(CXX_DEPENDS)
  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. ifeq ($(BUILD_VARIANT),curve)
  54. CONFIGURE_ARGS+= --with-libsodium
  55. else
  56. CONFIGURE_ARGS+= --without-libsodium
  57. endif
  58. define Build/InstallDev
  59. $(INSTALL_DIR) $(1)/usr/include
  60. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq.h $(1)/usr/include
  61. $(CP) $(PKG_INSTALL_DIR)/usr/include/zmq_utils.h $(1)/usr/include
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.{a,so*} $(1)/usr/lib/
  64. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  65. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libzmq.pc $(1)/usr/lib/pkgconfig/
  66. endef
  67. define Package/libzmq-nc/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libzmq.so.* $(1)/usr/lib/
  70. endef
  71. Package/libzmq-curve/install=$(Package/libzmq-nc/install)
  72. $(eval $(call BuildPackage,libzmq-nc))
  73. $(eval $(call BuildPackage,libzmq-curve))