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.

100 lines
2.6 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=redis
  3. PKG_VERSION:=6.2.3
  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:=98ed7d532b5e9671f5df0825bb71f0f37483a16546364049384c63db8764512b
  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. BUILDONLY:=1
  46. endef
  47. define Package/redis-full/description
  48. Redis is an open source, BSD licensed, advanced key-value cache and store.
  49. It is often referred to as a data structure server since keys can contain
  50. strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
  51. endef
  52. define Package/redis-server/conffiles
  53. /etc/redis.conf
  54. endef
  55. define Build/Compile
  56. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/hiredis" static $(MAKE_FLAGS) $(MAKE_VARS)
  57. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/linenoise" $(MAKE_FLAGS) $(MAKE_VARS)
  58. $(MAKE) -C "$(PKG_BUILD_DIR)/deps/lua" posix $(MAKE_FLAGS) $(MAKE_VARS) AR="${AR} ru"
  59. $(call Build/Compile/Default)
  60. endef
  61. define Package/redis-server/install
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-server $(1)/usr/bin/
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) ./files/redis.init $(1)/etc/init.d/redis
  66. $(INSTALL_DIR) $(1)/etc
  67. $(INSTALL_DATA) $(PKG_BUILD_DIR)/redis.conf $(1)/etc/
  68. $(SED) "s|^dir .*|dir /var/lib/redis|" $(1)/etc/redis.conf
  69. endef
  70. define Package/redis-cli/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-cli $(1)/usr/bin/
  73. endef
  74. define Package/redis-utils/install
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/redis-{check-aof,benchmark} $(1)/usr/bin/
  77. endef
  78. $(eval $(call BuildPackage,redis-full))
  79. $(eval $(call BuildPackage,redis-server))
  80. $(eval $(call BuildPackage,redis-cli))
  81. $(eval $(call BuildPackage,redis-utils))