2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-11 16:47:11 +01:00
|
|
|
#
|
|
|
|
# redis
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-03-11 16:47:11 +01:00
|
|
|
|
2018-10-23 00:56:40 +02:00
|
|
|
REDIS_VERSION = 4.0.11
|
2013-10-09 10:47:05 +02:00
|
|
|
REDIS_SITE = http://download.redis.io/releases
|
2017-03-30 15:43:38 +02:00
|
|
|
REDIS_LICENSE = BSD-3-Clause (core); MIT and BSD family licenses (Bundled components)
|
2013-03-11 16:47:11 +01:00
|
|
|
REDIS_LICENSE_FILES = COPYING
|
|
|
|
|
2015-07-23 13:20:26 +02:00
|
|
|
define REDIS_USERS
|
|
|
|
redis -1 redis -1 * /var/lib/redis /bin/false - Redis Server
|
|
|
|
endef
|
|
|
|
|
2017-05-25 09:19:34 +02:00
|
|
|
# Uses __atomic_fetch_add_4. Adding -latomic to LDFLAGS does not work,
|
|
|
|
# because LDFLAGS is used before the list of object files. We need to
|
|
|
|
# add -latomic to FINAL_LIBS to provide -latomic at the correct place
|
|
|
|
# in the linking command.
|
2016-03-28 16:11:01 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
2017-05-25 09:19:34 +02:00
|
|
|
define REDIS_FIX_MAKEFILE
|
|
|
|
$(SED) 's/FINAL_LIBS=-lm/FINAL_LIBS=-lm -latomic/' $(@D)/src/Makefile
|
|
|
|
endef
|
|
|
|
REDIS_POST_PATCH_HOOKS = REDIS_FIX_MAKEFILE
|
2016-03-28 16:11:01 +02:00
|
|
|
endif
|
|
|
|
|
2013-03-11 16:47:11 +01:00
|
|
|
# Redis doesn't support DESTDIR (yet, see
|
|
|
|
# https://github.com/antirez/redis/pull/609). We set PREFIX
|
|
|
|
# instead.
|
|
|
|
REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \
|
2017-04-05 00:50:14 +02:00
|
|
|
PREFIX=$(TARGET_DIR)/usr MALLOC=libc
|
2013-03-11 16:47:11 +01:00
|
|
|
|
|
|
|
define REDIS_BUILD_CMDS
|
2014-10-25 20:29:31 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D)
|
2013-03-11 16:47:11 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define REDIS_INSTALL_TARGET_CMDS
|
2014-10-25 20:29:31 +02:00
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) \
|
|
|
|
LDCONFIG=true install
|
2015-07-23 13:20:27 +02:00
|
|
|
$(INSTALL) -D -m 0644 $(@D)/redis.conf \
|
|
|
|
$(TARGET_DIR)/etc/redis.conf
|
2013-03-11 16:47:11 +01:00
|
|
|
endef
|
|
|
|
|
2015-07-23 13:20:28 +02:00
|
|
|
define REDIS_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -m 0755 -D package/redis/S50redis \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S50redis
|
|
|
|
endef
|
|
|
|
|
2015-07-23 13:20:29 +02:00
|
|
|
define REDIS_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 0644 package/redis/redis.service \
|
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/redis.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -fs ../../../../usr/lib/systemd/system/redis.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/redis.service
|
|
|
|
endef
|
|
|
|
|
2013-03-11 16:47:11 +01:00
|
|
|
$(eval $(generic-package))
|