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.

96 lines
2.5 KiB

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