toolchain: bump Codescape IMG MIPS version to 2016.05-06
[buildroot-gz.git] / package / redis / redis.mk
blob0b07d18bd341cbcfedc4992b5685761309e397be
1 ################################################################################
3 # redis
5 ################################################################################
7 REDIS_VERSION = 3.2.6
8 REDIS_SITE = http://download.redis.io/releases
9 REDIS_LICENSE = BSD-3c (core); MIT and BSD family licenses (Bundled components)
10 REDIS_LICENSE_FILES = COPYING
12 define REDIS_USERS
13 redis -1 redis -1 * /var/lib/redis /bin/false - Redis Server
14 endef
16 # Uses __atomic_fetch_add_4
17 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
18 REDIS_LIBATOMIC = -latomic
19 endif
21 # Redis doesn't support DESTDIR (yet, see
22 # https://github.com/antirez/redis/pull/609). We set PREFIX
23 # instead.
24 REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \
25 LDFLAGS="$(TARGET_LDFLAGS) $(REDIS_LIBATOMIC)" \
26 PREFIX=$(TARGET_DIR)/usr MALLOC=libc \
28 define REDIS_BUILD_CMDS
29 $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D)
30 endef
32 define REDIS_INSTALL_TARGET_CMDS
33 $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) \
34 LDCONFIG=true install
35 $(INSTALL) -D -m 0644 $(@D)/redis.conf \
36 $(TARGET_DIR)/etc/redis.conf
37 endef
39 define REDIS_INSTALL_INIT_SYSV
40 $(INSTALL) -m 0755 -D package/redis/S50redis \
41 $(TARGET_DIR)/etc/init.d/S50redis
42 endef
44 define REDIS_INSTALL_INIT_SYSTEMD
45 $(INSTALL) -D -m 0644 package/redis/redis.service \
46 $(TARGET_DIR)/usr/lib/systemd/system/redis.service
47 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
48 ln -fs ../../../../usr/lib/systemd/system/redis.service \
49 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/redis.service
50 endef
52 $(eval $(generic-package))