Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 1 | SUMMARY = "Redis key-value store" |
| 2 | DESCRIPTION = "Redis is an open source, advanced key-value store." |
| 3 | HOMEPAGE = "http://redis.io" |
| 4 | SECTION = "libs" |
| 5 | LICENSE = "BSD" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=3c01b49fed4df1a79843688fa3f7b9d6" |
| 7 | DEPENDS = "readline lua ncurses" |
| 8 | |
| 9 | SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \ |
| 10 | file://hiredis-use-default-CC-if-it-is-set.patch \ |
| 11 | file://lua-update-Makefile-to-use-environment-build-setting.patch \ |
| 12 | file://oe-use-libc-malloc.patch \ |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame^] | 13 | file://Fixed-stack-trace-generation-on-aarch64.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 14 | file://redis.conf \ |
| 15 | file://init-redis-server \ |
| 16 | file://redis.service \ |
| 17 | " |
| 18 | |
| 19 | SRC_URI_append_mips = " file://remove-atomics.patch" |
| 20 | SRC_URI_append_arm = " file://remove-atomics.patch" |
| 21 | SRC_URI_append_powerpc = " file://remove-atomics.patch" |
| 22 | |
| 23 | SRC_URI[md5sum] = "96ae20ffd68b9daee24b702b754d89f3" |
| 24 | SRC_URI[sha256sum] = "1e1e18420a86cfb285933123b04a82e1ebda20bfb0a289472745a087587e93a7" |
| 25 | |
| 26 | inherit autotools-brokensep update-rc.d systemd useradd |
| 27 | |
| 28 | USERADD_PACKAGES = "${PN}" |
| 29 | USERADD_PARAM_${PN} = "--system --home-dir /var/lib/redis -g redis --shell /bin/false redis" |
| 30 | GROUPADD_PARAM_${PN} = "--system redis" |
| 31 | |
| 32 | |
| 33 | REDIS_ON_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" |
| 34 | |
| 35 | do_compile_prepend() { |
| 36 | (cd deps && oe_runmake hiredis lua linenoise) |
| 37 | } |
| 38 | |
| 39 | do_install() { |
| 40 | export PREFIX=${D}/${prefix} |
| 41 | oe_runmake install |
| 42 | install -d ${D}/${sysconfdir}/redis |
| 43 | install -m 0644 ${WORKDIR}/redis.conf ${D}/${sysconfdir}/redis/redis.conf |
| 44 | install -d ${D}/${sysconfdir}/init.d |
| 45 | install -m 0755 ${WORKDIR}/init-redis-server ${D}/${sysconfdir}/init.d/redis-server |
| 46 | install -d ${D}/var/lib/redis/ |
| 47 | chown redis.redis ${D}/var/lib/redis/ |
| 48 | |
| 49 | install -d ${D}${systemd_system_unitdir} |
| 50 | install -m 0644 ${WORKDIR}/redis.service ${D}${systemd_system_unitdir} |
| 51 | sed -i 's!/usr/sbin/!${sbindir}/!g' ${D}${systemd_system_unitdir}/redis.service |
| 52 | |
| 53 | if [ "${REDIS_ON_SYSTEMD}" = true ]; then |
| 54 | sed -i 's!daemonize yes!# daemonize yes!' ${D}/${sysconfdir}/redis/redis.conf |
| 55 | fi |
| 56 | } |
| 57 | |
| 58 | CONFFILES_${PN} = "${sysconfdir}/redis/redis.conf" |
| 59 | |
| 60 | INITSCRIPT_NAME = "redis-server" |
| 61 | INITSCRIPT_PARAMS = "defaults 87" |
| 62 | |
| 63 | SYSTEMD_SERVICE_${PN} = "redis.service" |