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.

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