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.

107 lines
2.6 KiB

  1. #
  2. # Copyright (C) 2009-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=umurmur
  9. PKG_VERSION:=0.2.15
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  13. PKG_SOURCE_URL:=git://github.com/fatbob313/umurmur.git
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_VERSION:=f66c0c3d630aaff1c4d589bc4d884067f00b6529
  16. PKG_INSTALL:=1
  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://code.google.com/p/umurmur
  28. MAINTAINER:=Martin Johansson <martin@fatbob.nu>
  29. endef
  30. define Package/umurmur/Default/description
  31. Minimalistic Mumble server daemon.
  32. endef
  33. define Package/umurmur-openssl
  34. $(call Package/umurmur/Default)
  35. TITLE+= (with OpenSSL support)
  36. DEPENDS+= +libopenssl
  37. VARIANT:=openssl
  38. endef
  39. define Package/umurmur-openssl/description
  40. $(call Package/umurmur/Default/description)
  41. Uses OpenSSL library for SSL and crypto.
  42. endef
  43. define Package/umurmur-polarssl
  44. $(call Package/umurmur/Default)
  45. TITLE+= (with PolarSSL support)
  46. DEPENDS+= +libpolarssl
  47. VARIANT:=polarssl
  48. endef
  49. define Package/umurmur-polarssl/description
  50. $(call Package/umurmur/Default/description)
  51. Uses the PolarSSL library for SSL and crypto.
  52. endef
  53. define Build/Compile
  54. CC="$(TARGET_CC)" \
  55. CFLAGS="$(TARGET_CFLAGS)" \
  56. LDFLAGS="$(TARGET_LDFLAGS)" \
  57. $(MAKE) -C $(PKG_BUILD_DIR)/src all
  58. endef
  59. define Build/Configure
  60. cd $(PKG_BUILD_DIR) && ./autogen.sh
  61. $(call Build/Configure/Default)
  62. endef
  63. define Package/umurmur-openssl/conffiles
  64. /etc/umurmur.conf
  65. endef
  66. Package/umurmur-polarssl/conffiles = $(Package/umurmur-openssl/conffiles)
  67. define Package/umurmur-openssl/install
  68. $(INSTALL_DIR) $(1)/usr/bin
  69. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/
  70. $(INSTALL_DIR) $(1)/etc
  71. $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/
  72. $(INSTALL_DIR) $(1)/etc/init.d
  73. $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $(1)/etc/init.d/umurmur
  74. $(INSTALL_DIR) $(1)/etc/umurmur
  75. endef
  76. Package/umurmur-polarssl/install = $(Package/umurmur-openssl/install)
  77. ifeq ($(BUILD_VARIANT),openssl)
  78. CONFIGURE_ARGS += \
  79. --with-ssl=openssl
  80. endif
  81. ifeq ($(BUILD_VARIANT),polarssl)
  82. CONFIGURE_ARGS += \
  83. --with-ssl=polarssl
  84. endif
  85. $(eval $(call BuildPackage,umurmur-openssl))
  86. $(eval $(call BuildPackage,umurmur-polarssl))