diff --git a/sources/meta-tsgrain/conf/distro/tsgrain.conf b/sources/meta-tsgrain/conf/distro/tsgrain.conf index ecdedcf..fe5a66e 100644 --- a/sources/meta-tsgrain/conf/distro/tsgrain.conf +++ b/sources/meta-tsgrain/conf/distro/tsgrain.conf @@ -22,6 +22,8 @@ VIRTUAL-RUNTIME_dev_manager = "systemd" PACKAGE_CLASSES = "package_ipk" +hostname_pn-base-files = "tsgrain" + # Raspberry Pi specific settings SDIMG_ROOTFS_TYPE = "ext4" RPI_USE_U_BOOT = "1" diff --git a/sources/meta-tsgrain/recipes-core/images/tsgrain-image.bb b/sources/meta-tsgrain/recipes-core/images/tsgrain-image.bb index c436d37..c7647a7 100644 --- a/sources/meta-tsgrain/recipes-core/images/tsgrain-image.bb +++ b/sources/meta-tsgrain/recipes-core/images/tsgrain-image.bb @@ -10,6 +10,8 @@ IMAGE_INSTALL = "\ i2c-tools \ rauc-grow-data-part \ sebrauc \ + \ + rpi-gpio python3-smbus python3-flask python3-schedule python3-tinydb python3-flask-wtf \ " IMAGE_FEATURES = "\ diff --git a/sources/meta-tsgrain/recipes-core/timezone/files/set_tz b/sources/meta-tsgrain/recipes-core/timezone/files/set_tz new file mode 100644 index 0000000..b045ab1 --- /dev/null +++ b/sources/meta-tsgrain/recipes-core/timezone/files/set_tz @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +datadir="@DATADIR@" +configdir="/data/timezone" + +if [ -z "${1}" ]; then + echo "Usage: set_tz " + echo "Example: set_tz Europe/Berlin" + exit 1 +fi + +if [ -e "${datadir}/zoneinfo/${1}" ]; then + echo "${1}" > ${configdir}/timezone + ln -s "${datadir}/zoneinfo/${1}" ${configdir}/localtime +else + echo "Timezone is set to an invalid value." + exit 1 +fi diff --git a/sources/meta-tsgrain/recipes-core/timezone/tzdata.bbappend b/sources/meta-tsgrain/recipes-core/timezone/tzdata.bbappend new file mode 100644 index 0000000..878d52d --- /dev/null +++ b/sources/meta-tsgrain/recipes-core/timezone/tzdata.bbappend @@ -0,0 +1,25 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = "\ + file://set_tz \ +" + +do_install_append() { + install -d ${D}/data/timezone + install -d ${D}${bindir} + + echo ${DEFAULT_TIMEZONE} > ${D}/data/timezone/timezone + ln -s ${datadir}/zoneinfo/${DEFAULT_TIMEZONE} ${D}/data/timezone/localtime + + rm ${D}${sysconfdir}/timezone + rm ${D}${sysconfdir}/localtime + + ln -s /data/timezone/timezone ${D}${sysconfdir}/timezone + ln -s /data/timezone/localtime ${D}${sysconfdir}/localtime + + install -m 755 ${S}/set_tz ${D}${bindir}/set_tz + sed -i -e 's,@DATADIR@,${datadir},g' ${D}${bindir}/set_tz +} + +FILES_tzdata-core += "/data/timezone/localtime /data/timezone/timezone ${bindir}/set_tz" +CONFFILES_tzdata-core = "/data/timezone/localtime /data/timezone/timezone" diff --git a/sources/meta-tsgrain/recipes-python/flask-wtf/python3-flask-wtf_1.0.0.bb b/sources/meta-tsgrain/recipes-python/flask-wtf/python3-flask-wtf_1.0.0.bb new file mode 100644 index 0000000..a5c8987 --- /dev/null +++ b/sources/meta-tsgrain/recipes-python/flask-wtf/python3-flask-wtf_1.0.0.bb @@ -0,0 +1,29 @@ +# Recipe created by recipetool +# This is the basis of a recipe and may need further editing in order to be fully functional. +# (Feel free to remove these comments when editing.) + +SUMMARY = "Form rendering, validation, and CSRF protection for Flask with WTForms." +HOMEPAGE = "https://github.com/wtforms/flask-wtf/" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENSE.rst;md5=d98d089889e14b227732d45dac3aacc4" + +SRC_URI = "https://files.pythonhosted.org/packages/06/bb/090df80acb1f51ee3996d822ba34096b3e54b3af76c2c46530d6cf35c9b9/Flask-WTF-${PV}.tar.gz" +SRC_URI[md5sum] = "a41a7bef1438c63b2a4d88214812412f" +SRC_URI[sha1sum] = "4b616eb52694832f716e2c24073690d5ca7f8a79" +SRC_URI[sha256sum] = "872fbb17b5888bfc734edbdcf45bc08fb365ca39f69d25dc752465a455517b28" +SRC_URI[sha384sum] = "c82494d3bb9557be4dff372c3437e9e10bd552e5b727777e9d9ed59e87bd01c61731a51aa7bc3a9e0fbaba5966c8f895" +SRC_URI[sha512sum] = "4b47e3586e3fb34f2ef964fb2a84d25c8279d4ce98e2064655e5ecb5f8fd67e4637ffd81b171e4623e2cd943e5abbcb6f5980ea8a354c2745d65c64161c0fd60" + +S = "${WORKDIR}/Flask-WTF-${PV}" + +inherit setuptools3 + +# The following configs & dependencies are from setuptools extras_require. +# These dependencies are optional, hence can be controlled via PACKAGECONFIG. +# The upstream names may not correspond exactly to bitbake package names. +# +# Uncomment this line to enable all the optional features. +#PACKAGECONFIG ?= "email" +PACKAGECONFIG[email] = "python3-email-validator" + +RDEPENDS_${PN} += "python3-core python3-flask python3-wtforms python3-itsdangerous" diff --git a/sources/meta-tsgrain/recipes-python/schedule/python3-schedule_1.1.0.bb b/sources/meta-tsgrain/recipes-python/schedule/python3-schedule_1.1.0.bb new file mode 100644 index 0000000..822103c --- /dev/null +++ b/sources/meta-tsgrain/recipes-python/schedule/python3-schedule_1.1.0.bb @@ -0,0 +1,21 @@ +# Recipe created by recipetool +# This is the basis of a recipe and may need further editing in order to be fully functional. +# (Feel free to remove these comments when editing.) + +SUMMARY = "Job scheduling for humans." +HOMEPAGE = "https://github.com/dbader/schedule" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=6400f153491d45ea3459761627ca24b2" + +SRC_URI = "https://files.pythonhosted.org/packages/a8/b5/a291a4c0faa491fd5baefa6d89011ece581cff47b23c0a39b42a63383358/schedule-${PV}.tar.gz" +SRC_URI[md5sum] = "9bf7544e37824e450457187633a17b17" +SRC_URI[sha1sum] = "fd1d05a24ce99f8530cf03a7237989280a9d8129" +SRC_URI[sha256sum] = "e6ca13585e62c810e13a08682e0a6a8ad245372e376ba2b8679294f377dfc8e4" +SRC_URI[sha384sum] = "f20415c7a6382fce9c6e2011b3241698a347e7fd5d2eb5b8879f380b92604456939e678df14e60949868d64cc1d97148" +SRC_URI[sha512sum] = "bcfb6202659eba0a0613f68d8b06b9f2ffffce0444e231533932f72b01316b72674208a80418de54630d9b25bb80f1c202061672f7c40ca38020b19a0a51fc3f" + +S = "${WORKDIR}/schedule-${PV}" + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-core python3-datetime python3-logging python3-math" diff --git a/sources/meta-tsgrain/recipes-python/tinydb/python3-tinydb_4.5.2.bb b/sources/meta-tsgrain/recipes-python/tinydb/python3-tinydb_4.5.2.bb new file mode 100644 index 0000000..642bc72 --- /dev/null +++ b/sources/meta-tsgrain/recipes-python/tinydb/python3-tinydb_4.5.2.bb @@ -0,0 +1,21 @@ +# Recipe created by recipetool +# This is the basis of a recipe and may need further editing in order to be fully functional. +# (Feel free to remove these comments when editing.) + +SUMMARY = "TinyDB is a tiny, document oriented database optimized for your happiness :)" +HOMEPAGE = "https://github.com/msiemens/tinydb" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ee9d91e0565d932659cf275d126c7437" + +SRC_URI = "https://files.pythonhosted.org/packages/83/8f/d4d9d4d320d4efb58d723992c32d1384aa6fa685897ee2ee8e90965aba4e/tinydb-${PV}.tar.gz" +SRC_URI[md5sum] = "51b5386f4241e4b0edd10e47f695f323" +SRC_URI[sha1sum] = "937624844159b4ee1e84b2392834dcd01702431c" +SRC_URI[sha256sum] = "7d18b2d0217827c188f177cd23df60e5cd5316a717e836a8e21c8c2488262cf5" +SRC_URI[sha384sum] = "a5fe963204b46f3fa1317c6ad463d20f1f1f54865b4baa2a71ffa2e6dd70feb3934d15b15c9a9e13a74e0ad129cd9123" +SRC_URI[sha512sum] = "219e46cf9a2427bdffc125e922241626653eb16ab570607156e5c041596f8ccce6b1360cadb8d76d33f6c6fa17bd59ca98ce7fa8b840bcaf6c558b635aaf84e6" + +S = "${WORKDIR}/tinydb-${PV}" + +inherit setuptools3 + +RDEPENDS_${PN} += "python3-core python3-json"