1DESCRIPTION = "InfluxDB is a time series database designed to handle high write and query loads." 2HOMEPAGE = "https://www.influxdata.com/products/influxdb-overview/" 3 4LICENSE = "MIT" 5LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=f39a8d10930fb37bd59adabb3b9d0bd6" 6 7RDEPENDS:${PN} = "bash" 8RDEPENDS:${PN}-dev = "bash" 9 10GO_IMPORT = "github.com/influxdata/influxdb" 11 12GO_INSTALL = "\ 13 ${GO_IMPORT}/cmd/influx \ 14 ${GO_IMPORT}/cmd/influxd \ 15" 16 17SRC_URI = "\ 18 git://${GO_IMPORT};protocol=https;branch=1.8;destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \ 19 file://0001-Use-v2.1.2-xxhash-to-fix-build-with-go-1.17.patch;patchdir=src/${GO_IMPORT} \ 20 file://influxdb \ 21 file://influxdb.conf \ 22" 23 24SRC_URI:append:mipsarch = " file://0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch;patchdir=src/${GO_IMPORT}" 25 26SRCREV = "688e697c51fd5353725da078555adbeff0363d01" 27 28inherit go-mod pkgconfig systemd update-rc.d useradd 29 30# Workaround for network access issue during compile step 31# this needs to be fixed in the recipes buildsystem to move 32# this such that it can be accomplished during do_fetch task 33do_compile[network] = "1" 34 35USERADD_PACKAGES = "${PN}" 36USERADD_PARAM:${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb" 37 38do_install:prepend() { 39 rm ${B}/src/${GO_IMPORT}/build.py 40 rm ${B}/src/${GO_IMPORT}/build.sh 41 rm ${B}/src/${GO_IMPORT}/Dockerfile* 42 sed -i -e "s#usr/bin/sh#bin/sh#g" ${B}/src/${GO_IMPORT}/scripts/ci/run_perftest.sh 43} 44 45do_install:append() { 46 install -d ${D}${sysconfdir}/influxdb 47 install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb 48 chown -R root.influxdb ${D}${sysconfdir}/influxdb 49 50 install -d ${D}${sysconfdir}/init.d 51 install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb 52 53 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then 54 install -d ${D}${sysconfdir}/logrotate.d 55 install -m 0644 ${S}/src/${GO_IMPORT}/scripts/logrotate ${D}${sysconfdir}/logrotate.d/influxdb 56 fi 57 58 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then 59 install -d ${D}${systemd_unitdir}/system 60 install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service 61 fi 62 63 # TODO chown 64} 65 66INITSCRIPT_PACKAGES = "${PN}" 67INITSCRIPT_NAME = "influxdb" 68INITSCRIPT_PARAMS = "defaults" 69 70SYSTEMD_SERVICE:${PN} = "influxdb.service" 71