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.

101 lines
2.5 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.16-20161126
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  11. PKG_SOURCE_URL:=https://github.com/umurmur/umurmur.git
  12. PKG_SOURCE_PROTO:=git
  13. PKG_SOURCE_VERSION:=fac630135664fda26338d403041b6b6e558a2d6b
  14. PKG_MIRROR_HASH:=6773aebea9aea355a41425e946291bb47bc399f85483bd6532cf26dfc7c801e5
  15. PKG_INSTALL:=1
  16. PKG_FIXUP:=autoreconf
  17. PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
  18. PKG_LICENSE:=BSD-3-Clause
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/umurmur/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Instant Messaging
  25. TITLE:=uMurmur
  26. DEPENDS:=+libconfig +libprotobuf-c
  27. URL:=http://umurmur.net
  28. endef
  29. define Package/umurmur/Default/description
  30. Minimalistic Mumble server daemon.
  31. endef
  32. define Package/umurmur-openssl
  33. $(call Package/umurmur/Default)
  34. TITLE+= (with OpenSSL support)
  35. DEPENDS+= +libopenssl
  36. VARIANT:=openssl
  37. endef
  38. define Package/umurmur-openssl/description
  39. $(call Package/umurmur/Default/description)
  40. Uses OpenSSL library for SSL and crypto.
  41. endef
  42. define Package/umurmur-mbedtls
  43. $(call Package/umurmur/Default)
  44. TITLE+= (with mbed TLS support)
  45. DEPENDS+= +libmbedtls
  46. VARIANT:=mbedtls
  47. endef
  48. define Package/umurmur-mbedtls/description
  49. $(call Package/umurmur/Default/description)
  50. Uses the mbed TLS library for SSL and crypto.
  51. endef
  52. define Build/Compile
  53. CC="$(TARGET_CC)" \
  54. CFLAGS="$(TARGET_CFLAGS)" \
  55. LDFLAGS="$(TARGET_LDFLAGS)" \
  56. $(MAKE) -C $(PKG_BUILD_DIR)/src all
  57. endef
  58. define Package/umurmur-openssl/conffiles
  59. /etc/umurmur.conf
  60. endef
  61. Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles)
  62. define Package/umurmur-openssl/install
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/
  65. $(INSTALL_DIR) $(1)/etc
  66. $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/
  67. $(INSTALL_DIR) $(1)/etc/init.d
  68. $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $(1)/etc/init.d/umurmur
  69. $(INSTALL_DIR) $(1)/etc/umurmur
  70. endef
  71. Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install)
  72. ifeq ($(BUILD_VARIANT),openssl)
  73. CONFIGURE_ARGS += \
  74. --with-ssl=openssl
  75. endif
  76. ifeq ($(BUILD_VARIANT),mbedtls)
  77. CONFIGURE_ARGS += \
  78. --with-ssl=mbedtls
  79. endif
  80. $(eval $(call BuildPackage,umurmur-openssl))
  81. $(eval $(call BuildPackage,umurmur-mbedtls))