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.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=redis
  3. PKG_VERSION:=6.0.1
  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:=b8756e430479edc162ba9c44dc89ac394316cd482f2dc6b91bcd5fe12593f273
  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. TARGET_LDFLAGS += -latomic
  20. define Package/redis/Default
  21. SUBMENU:=Database
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. URL:=https://redis.io
  25. endef
  26. define Package/redis-server
  27. $(call Package/redis/Default)
  28. TITLE:=Redis server
  29. DEPENDS:=+libpthread +libatomic
  30. endef
  31. define Package/redis-cli
  32. $(call Package/redis/Default)
  33. TITLE:=Redis cli
  34. DEPENDS+=+libatomic
  35. endef
  36. define Package/redis-utils
  37. $(call Package/redis/Default)
  38. TITLE:=Redis utilities
  39. DEPENDS:=+redis-server
  40. endef
  41. define Package/redis-full
  42. $(call Package/redis/Default)
  43. TITLE:=All Redis binaries (server,cli and utils)
  44. DEPENDS:=+redis-utils +redis-cli
  45. endef
  46. define Package/redis-full/description
  47. Redis is an open source, BSD licensed, advanced key-value cache and store.
  48. It is often referred to as a data structure server since keys can contain
  49. strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
  50. endef
  51. define Package/redis-server/conffiles
  52. /etc/redis.conf
  53. endef
  54. define Build/Compile
  55. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/hiredis" static $(MAKE_FLAGS) $(MAKE_VARS)
  56. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/linenoise" $(MAKE_FLAGS) $(MAKE_VARS)
  57. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/lua" posix $(MAKE_FLAGS) $(MAKE_VARS) AR="${AR} ru"
  58. $(call Build/Compile/Default)
  59. endef
  60. define Package/redis-server/install
  61. $(INSTALL_DIR) $(1)/usr/bin
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-server $(1)/usr/bin/
  63. $(INSTALL_DIR) $(1)/etc/init.d
  64. $(INSTALL_BIN) ./files/redis.init $(1)/etc/init.d/redis
  65. $(INSTALL_DIR) $(1)/etc
  66. $(INSTALL_DATA) $(PKG_BUILD_DIR)/redis.conf $(1)/etc/
  67. $(SED) "s|^dir .*|dir /var/lib/redis|" $(1)/etc/redis.conf
  68. endef
  69. define Package/redis-cli/install
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-cli $(1)/usr/bin/
  72. endef
  73. define Package/redis-utils/install
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-{check-aof,benchmark} $(1)/usr/bin/
  76. endef
  77. $(eval $(call BuildPackage,redis-full))
  78. $(eval $(call BuildPackage,redis-server))
  79. $(eval $(call BuildPackage,redis-cli))
  80. $(eval $(call BuildPackage,redis-utils))