blob: 06f7947642766d0723799c633b2de6dd16721830 [file] [log] [blame]
Andrew Geisslereef63862021-01-29 15:58:13 -06001DESCRIPTION = "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=ba8146ad9cc2a128209983265136e06a"
6
7FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
8
9RDEPENDS_${PN} = "bash"
10RDEPENDS_${PN}-dev = "bash"
11
12GO_IMPORT = "github.com/influxdata/influxdb"
13
14GO_INSTALL = "\
15 ${GO_IMPORT}/cmd/influx \
16 ${GO_IMPORT}/cmd/influxd \
17"
18
19SRC_URI = "\
20 git://${GO_IMPORT};protocol=https;branch=1.7;destsuffix=${BPN}-${PV}/src/${GO_IMPORT} \
21 file://influxdb \
22 file://influxdb.conf \
23"
24
25SRC_URI_append_mipsarch = " file://0001-patch-term-module-for-mips-ispeed-ospeed-termios-abs.patch;patchdir=src/${GO_IMPORT}"
26
27SRCREV = "c958f436b2e538a88a7815aad721c7774a0b8f63"
28
29inherit go-mod systemd update-rc.d useradd
30
31USERADD_PACKAGES = "${PN}"
32USERADD_PARAM_${PN} = "--system -d /var/lib/influxdb -m -s /bin/nologin influxdb"
33
34do_install_prepend() {
35 rm ${B}/src/${GO_IMPORT}/build.py
36 rm ${B}/src/${GO_IMPORT}/build.sh
37 rm ${B}/src/${GO_IMPORT}/Dockerfile*
38}
39
40do_install_append() {
41 install -d ${D}${sysconfdir}/influxdb
42 install -m 0644 ${WORKDIR}/influxdb.conf ${D}${sysconfdir}/influxdb
43 chown -R root.influxdb ${D}${sysconfdir}/influxdb
44
45 install -d ${D}${sysconfdir}/init.d
46 install -m 0755 ${WORKDIR}/influxdb ${D}${sysconfdir}/init.d/influxdb
47
48 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'sysvinit', d)}" ] ; then
49 install -d ${D}${sysconfdir}/logrotate.d
50 install -m 0644 ${S}/src/${GO_IMPORT}/scripts/logrotate ${D}${sysconfdir}/logrotate.d/influxdb
51 fi
52
53 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ] ; then
54 install -d ${D}${systemd_unitdir}/system
55 install -m 0644 ${S}/src/${GO_IMPORT}/scripts/influxdb.service ${D}${systemd_system_unitdir}/influxdb.service
56 fi
57
58 # TODO chown
59}
60
61INITSCRIPT_PACKAGES = "${PN}"
62INITSCRIPT_NAME = "influxdb"
63INITSCRIPT_PARAMS = "defaults"
64
65SYSTEMD_SERVICE_${PN} = "influxdb.service"