Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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_MD5SUM:=0e031baa5cebcdb4eb39a0cde572014f
  15. PKG_MIRROR_HASH:=6773aebea9aea355a41425e946291bb47bc399f85483bd6532cf26dfc7c801e5
  16. PKG_INSTALL:=1
  17. PKG_FIXUP:=autoreconf
  18. PKG_MAINTAINER:=Martin Johansson <martin@fatbob.nu>
  19. PKG_LICENSE:=BSD-3-Clause
  20. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/umurmur/Default
  23. SECTION:=net
  24. CATEGORY:=Network
  25. SUBMENU:=Instant Messaging
  26. TITLE:=uMurmur
  27. DEPENDS:=+libconfig +libprotobuf-c
  28. URL:=http://umurmur.net
  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-mbedtls
  44. $(call Package/umurmur/Default)
  45. TITLE+= (with mbed TLS support)
  46. DEPENDS+= +libmbedtls
  47. VARIANT:=mbedtls
  48. endef
  49. define Package/umurmur-mbedtls/description
  50. $(call Package/umurmur/Default/description)
  51. Uses the mbed TLS 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 Package/umurmur-openssl/conffiles
  60. /etc/umurmur.conf
  61. endef
  62. Package/umurmur-mbedtls/conffiles = $(Package/umurmur-openssl/conffiles)
  63. define Package/umurmur-openssl/install
  64. $(INSTALL_DIR) $(1)/usr/bin
  65. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/umurmurd $(1)/usr/bin/
  66. $(INSTALL_DIR) $(1)/etc
  67. $(INSTALL_CONF) $(PKG_BUILD_DIR)/openwrt/files/umurmur.conf $(1)/etc/
  68. $(INSTALL_DIR) $(1)/etc/init.d
  69. $(INSTALL_BIN) $(PKG_BUILD_DIR)/openwrt/files/umurmur.init $(1)/etc/init.d/umurmur
  70. $(INSTALL_DIR) $(1)/etc/umurmur
  71. endef
  72. Package/umurmur-mbedtls/install = $(Package/umurmur-openssl/install)
  73. ifeq ($(BUILD_VARIANT),openssl)
  74. CONFIGURE_ARGS += \
  75. --with-ssl=openssl
  76. endif
  77. ifeq ($(BUILD_VARIANT),mbedtls)
  78. CONFIGURE_ARGS += \
  79. --with-ssl=mbedtls
  80. endif
  81. $(eval $(call BuildPackage,umurmur-openssl))
  82. $(eval $(call BuildPackage,umurmur-mbedtls))