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.

94 lines
2.5 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=redis
  3. PKG_VERSION:=5.0.5
  4. PKG_RELEASE:=2
  5. PKG_SOURCE_URL:=http://download.redis.io/releases/
  6. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  7. PKG_HASH:=2139009799d21d8ff94fc40b7f36ac46699b9e1254086299f8d3b223ca54a375
  8. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec@nic.cz>
  9. PKG_LICENSE:=BSD-3-Clause
  10. PKG_LICENSE_FILES:=COPYING
  11. PKG_INSTALL:=1
  12. include $(INCLUDE_DIR)/package.mk
  13. MAKE_FLAGS+= \
  14. MALLOC="libc" \
  15. USE_JEMALLOC="no" \
  16. PREFIX="$(PKG_INSTALL_DIR)/usr" \
  17. ARCH=""
  18. define Package/redis/Default
  19. SUBMENU:=Database
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. URL:=https://redis.io
  23. endef
  24. define Package/redis-server
  25. $(call Package/redis/Default)
  26. TITLE:=Redis server
  27. DEPENDS:=+libpthread
  28. endef
  29. define Package/redis-cli
  30. $(call Package/redis/Default)
  31. TITLE:=Redis cli
  32. endef
  33. define Package/redis-utils
  34. $(call Package/redis/Default)
  35. TITLE:=Redis utilities
  36. DEPENDS:=+redis-server
  37. endef
  38. define Package/redis-full
  39. $(call Package/redis/Default)
  40. TITLE:=All Redis binaries (server,cli and utils)
  41. DEPENDS:=+redis-utils +redis-cli
  42. endef
  43. define Package/redis-full/description
  44. Redis is an open source, BSD licensed, advanced key-value cache and store.
  45. It is often referred to as a data structure server since keys can contain
  46. strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
  47. endef
  48. define Package/redis-server/conffiles
  49. /etc/redis.conf
  50. endef
  51. define Build/Compile
  52. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/hiredis" static $(MAKE_FLAGS) $(MAKE_VARS)
  53. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/linenoise" $(MAKE_FLAGS) $(MAKE_VARS)
  54. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/lua" posix $(MAKE_FLAGS) $(MAKE_VARS) AR="${AR} ru"
  55. $(call Build/Compile/Default)
  56. endef
  57. define Package/redis-server/install
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-server $(1)/usr/bin/
  60. $(INSTALL_DIR) $(1)/etc/init.d
  61. $(INSTALL_BIN) ./files/redis.init $(1)/etc/init.d/redis
  62. $(INSTALL_DIR) $(1)/etc
  63. $(INSTALL_DATA) $(PKG_BUILD_DIR)/redis.conf $(1)/etc/
  64. $(SED) "s|^dir .*|dir /var/lib/redis|" $(1)/etc/redis.conf
  65. endef
  66. define Package/redis-cli/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-cli $(1)/usr/bin/
  69. endef
  70. define Package/redis-utils/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-{check-aof,benchmark} $(1)/usr/bin/
  73. endef
  74. $(eval $(call BuildPackage,redis-full))
  75. $(eval $(call BuildPackage,redis-server))
  76. $(eval $(call BuildPackage,redis-cli))
  77. $(eval $(call BuildPackage,redis-utils))