diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-03-02 22:06:48 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-03-02 22:06:48 +0300 |
commit | 9600a7403ba2848c8751280077503a3e0f2f3481 (patch) | |
tree | 996726918f255cc9686dec34628fab410ac8f550 /meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.7.bb | |
parent | b11bad1ba28f79c08266efb9cc265d89103e5939 (diff) | |
parent | 5ec7af7413906b500cce396255bde69c9770f6d8 (diff) | |
download | openbmc-9600a7403ba2848c8751280077503a3e0f2f3481.tar.xz |
Merge branch 'master' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.7.bb')
-rw-r--r-- | meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.7.bb | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.7.bb b/meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.7.bb new file mode 100644 index 000000000..b91575552 --- /dev/null +++ b/meta-openembedded/meta-oe/recipes-extended/redis/redis_5.0.7.bb @@ -0,0 +1,67 @@ +SUMMARY = "Redis key-value store" +DESCRIPTION = "Redis is an open source, advanced key-value store." +HOMEPAGE = "http://redis.io" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=3c01b49fed4df1a79843688fa3f7b9d6" +DEPENDS = "readline lua ncurses" + +SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ + file://redis.conf \ + file://init-redis-server \ + file://redis.service \ + file://hiredis-use-default-CC-if-it-is-set.patch \ + file://lua-update-Makefile-to-use-environment-build-setting.patch \ + file://oe-use-libc-malloc.patch \ + file://0001-src-Do-not-reset-FINAL_LIBS.patch \ + file://0005-Mark-extern-definition-of-SDS_NOINIT-in-sds.h.patch \ + file://GNU_SOURCE.patch \ + " + +SRC_URI[md5sum] = "612ec43075a888bc8b8a7dd8ccb2e0f7" +SRC_URI[sha256sum] = "61db74eabf6801f057fd24b590232f2f337d422280fd19486eca03be87d3a82b" + +inherit autotools-brokensep update-rc.d systemd useradd + +FINAL_LIBS_x86_toolchain-clang = "-latomic" +FINAL_LIBS_mips = "-latomic" +FINAL_LIBS_arm = "-latomic" +FINAL_LIBS_powerpc = "-latomic" + +export FINAL_LIBS + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" +GROUPADD_PARAM_${PN} = "--system redis" + +REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" + +do_compile_prepend() { + (cd deps && oe_runmake hiredis lua linenoise) +} + +do_install() { + export PREFIX=${D}/${prefix} + oe_runmake install + install -d ${D}/${sysconfdir}/redis + install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server + install -d ${D}/var/lib/redis/ + chown redis.redis ${D}/var/lib/redis/ + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir} + sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service + + if [ "${REDIS_ON_SYSTEMD}" = true ]; then + sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf + fi +} + +CONFFILES_${PN} = "${sysconfdir}/redis/redis.conf" + +INITSCRIPT_NAME = "redis-server" +INITSCRIPT_PARAMS = "defaults 87" + +SYSTEMD_SERVICE_${PN} = "redis.service" |