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.

97 lines
2.7 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=umurmur
  7. PKG_VERSION:=0.2.20
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  10. PKG_SOURCE_URL:=https://codeload.github.com/umurmur/umurmur/tar.gz/$(PKG_VERSION)?
  11. PKG_HASH:=b7b2978c3197aef0a6531f1cf0ee1aebb32a55ad8bda43064ce3a944edbcac83
  12. PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
  13. PKG_LICENSE:=BSD-3-Clause
  14. PKG_LICENSE_FILES:=LICENSE
  15. PKG_BUILD_PARALLEL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../devel/ninja/ninja-cmake.mk
  18. define Package/umurmur/Default
  19. SECTION:=net
  20. CATEGORY:=Network
  21. SUBMENU:=Instant Messaging
  22. TITLE:=uMurmur
  23. DEPENDS:=+libconfig +libprotobuf-c
  24. URL:=https://umurmur.net
  25. endef
  26. define Package/umurmur/Default/description
  27. Minimalistic Mumble server daemon.
  28. endef
  29. define Package/umurmur-openssl
  30. $(call Package/umurmur/Default)
  31. TITLE+= (with OpenSSL support)
  32. DEPENDS+= +libopenssl
  33. VARIANT:=openssl
  34. endef
  35. define Package/umurmur-openssl/description
  36. $(call Package/umurmur/Default/description)
  37. Uses OpenSSL library for SSL and crypto.
  38. endef
  39. define Package/umurmur-mbedtls
  40. $(call Package/umurmur/Default)
  41. TITLE+= (with mbed TLS support)
  42. DEPENDS+= +libmbedtls
  43. VARIANT:=mbedtls
  44. endef
  45. define Package/umurmur-mbedtls/description
  46. $(call Package/umurmur/Default/description)
  47. Uses the mbed TLS library for SSL and crypto.
  48. endef
  49. define Package/umurmur-openssl/conffiles
  50. /etc/umurmur.conf
  51. endef
  52. Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles)
  53. define Package/umurmur-openssl/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/umurmurd $(1)/usr/bin/
  56. $(INSTALL_DIR) $(1)/etc
  57. $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/
  58. $(INSTALL_DIR) $(1)/etc/init.d
  59. $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $(1)/etc/init.d/umurmur
  60. $(INSTALL_DIR) $(1)/etc/umurmur
  61. endef
  62. Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install)
  63. CMAKE_OPTIONS += \
  64. -DLIBCONFIG_INCLUDE_DIR="$(STAGING_DIR)/usr/include" \
  65. -DLIBCONFIG_LIBRARIES="$(STAGING_DIR)/usr/lib" \
  66. -DLIBCONFIG_LIB_DIR="$(STAGING_DIR)/usr/lib" \
  67. -DPROTOBUFC_INCLUDE_DIR="$(STAGING_DIR)/usr/include" \
  68. -DPROTOBUFC_LIBRARIES="$(STAGING_DIR)/usr/lib" \
  69. -DPROTOBUFC_LIB_DIR="$(STAGING_DIR)/usr/lib"
  70. ifeq ($(BUILD_VARIANT),openssl)
  71. CMAKE_OPTIONS += -DSSL=openssl
  72. else
  73. CMAKE_OPTIONS += -DSSL=mbedtls \
  74. -DMBEDTLS_INCLUDE_DIR="$(STAGING_DIR)/usr/include/mbedtls" \
  75. -DMBEDTLS_LIBRARIES="$(STAGING_DIR)/usr/lib" \
  76. -DMBEDTLS_LIB_DIR="$(STAGING_DIR)/usr/lib"
  77. endif
  78. $(eval $(call BuildPackage,umurmur-openssl))
  79. $(eval $(call BuildPackage,umurmur-mbedtls))