Last active
August 27, 2019 08:26
-
-
Save proffalken/972d8f180d7371713c8f589688486838 to your computer and use it in GitHub Desktop.
Yocto Layer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf | |
# changes incompatibly | |
POKY_BBLAYERS_CONF_VERSION = "1" | |
BBPATH = "${TOPDIR}" | |
BBFILES ?= "" | |
# Hardware vendor | |
# | |
# Options are: | |
# * raspberrypi - For Raspberry Pi based gateways | |
# * wifx - For the LORIX One gateway | |
VENDOR = "raspberrypi" | |
BBLAYERS ?= " \ | |
${TOPDIR}/../meta \ | |
${TOPDIR}/../layers/targets/meta-${VENDOR} \ | |
${TOPDIR}/../layers/bsp/meta-${VENDOR} \ | |
${TOPDIR}/../layers/loraserver/meta-tools \ | |
${TOPDIR}/../layers/loraserver/meta-semtech \ | |
${TOPDIR}/../layers/loraserver/meta-loraserver \ | |
${TOPDIR}/../layers/mender/meta-mender/meta-mender-core \ | |
${TOPDIR}/../layers/openembedded/meta-openembedded/meta-networking \ | |
${TOPDIR}/../layers/openembedded/meta-openembedded/meta-filesystems \ | |
${TOPDIR}/../layers/openembedded/meta-openembedded/meta-python \ | |
${TOPDIR}/../layers/openembedded/meta-openembedded/meta-oe \ | |
${TOPDIR}/../layers/openembedded/openembedded-core/meta \ | |
${TOPDIR}/../../mbc-layers/meta-telegraf \ | |
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parsing recipes...done. | |
Parsing of 2161 .bb files complete (0 cached, 2161 parsed). 3128 targets, 152 skipped, 0 masked, 0 errors. | |
WARNING: No bb files matched BBFILE_PATTERN_meta-telegraf '^/media/yocto/jenkins/jenkins-meta/jenkins-meta/workspace/eway-os_feature_install_telegraf/lora-gateway-os/build/../../mbc-layers/meta-telegraf/' | |
NOTE: Resolving any missing task queue dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | |
└── meta-telegraf | |
├── conf | |
│ └── layer.conf | |
├── COPYING.MIT | |
├── README | |
└── recipes-telegraf | |
└── telegraf | |
└── telegraf_0.1.bb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We have a conf and classes directory, add to BBPATH | |
BBPATH .= ":${LAYERDIR}" | |
# We have recipes-* directories, add to BBFILES | |
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ | |
${LAYERDIR}/recipes-*/*/*.bbappend" | |
BBFILE_COLLECTIONS += "meta-telegraf" | |
BBFILE_PATTERN_meta-telegraf = "^${LAYERDIR}/" | |
BBFILE_PRIORITY_meta-telegraf = "6" | |
LAYERDEPENDS_meta-telegraf = "core" | |
LAYERSERIES_COMPAT_meta-telegraf = "thud warrior" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUMMARY = "The plugin-driven server agent for collecting & reporting metrics." | |
LICENSE = "MIT" | |
LIC_FILES_CHKSUM = "file://${WORKDIR}/${PN}-${PV}-LICENSE;md5=96cd9a86f733dbfec4107613b9b27c71" | |
SRC_URI = " \ | |
https://raw.githubusercontent.com/influxdata/${PN}/${PV}/LICENSE;downloadfilename=${PN}-${PV}-LICENSE;name=license \ | |
" | |
SRC_URI_append_arm = "\ | |
https://dl.influxdata.com/telegraf/releases/telegraf-${PV}_linux_armhf.tar.gz;name=armhf \ | |
" | |
SRC_URI[license.md5sum] = "96cd9a86f733dbfec4107613b9b27c71" | |
SRC_URI[armhf.sha256sum] = "21c846f08ffa84830546688901a3eaf9987197a703a0092796e13079481ac8c9" | |
COMPATIBLE_HOST = "arm" | |
COMPATIBLE_HOST_armv4 = "null" | |
COMPATIBLE_HOST_armv5 = "null" | |
COMPATIBLE_HOST_armv6 = "null" | |
S = "${WORKDIR}/telegraf" | |
inherit bin_package distro_features_check systemd | |
REQUIRED_DISTRO_FEATURES = "systemd" | |
do_install_append() { | |
install -d ${D}${systemd_system_unitdir} | |
sed -e '/User=telegraf/d; /\[Unit\]/aConditionPathExists=/etc/telegraf/telegraf.conf' <${D}/usr/lib/telegraf/scripts/telegraf.service >${D}${systemd_system_unitdir}/telegraf.service | |
rm -r ${D}/var ${D}/etc/logrotate.d ${D}/usr/lib/telegraf \ | |
${D}/etc/telegraf/telegraf.conf | |
} | |
INSANE_SKIP_${PN} = "already-stripped" | |
SYSTEMD_PACKAGES = "${PN}" | |
SYSTEMD_SERVICE_${PN} = "${PN}.service" | |
SYSTEMD_AUTO_ENABLE = "enable" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment