Skip to content

Commit

Permalink
labgrid-powerrelay: add recipe
Browse files Browse the repository at this point in the history
Rest api for control gpio chips

Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
  • Loading branch information
prevas-jdtn authored and jluebbe committed Jan 4, 2019
1 parent 3d55e0c commit 1c5a62b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Powerrelay init
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
Environment="LC_ALL=C.UTF-8"
Environment="LANG=C.UTF-8"

ExecStart=/usr/bin/powerrelay run /etc/powerrelay/config.yaml

[Install]
WantedBy=multi-user.target
36 changes: 36 additions & 0 deletions recipes-devtools/python/python3-powerrelay_git.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
DESCRIPTION = "REST API to control GPIO chips"
HOMEPAGE = "https://github.com/prevas-dk/labgrid-powerrelay"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=20796caa814f193af92c180d146bb7ec"

RDEPENDS_${PN} = " \
python3-click \
python3-aiohttp \
python3-trafaret \
python3-trafaret-config \
python3-aiohttp-jinja2 \
python3-yarl \
python3-multidict \
"

SRC_URI = " \
git://github.com/prevas-dk/labgrid-powerrelay.git;protocol=https;branch=master \
file://labgrid-powerrelay.service \
"
SRCREV = "bf5d2e11e0f594757d3d97a6a9f38480713aaace"

S = "${WORKDIR}/git"

DEPENDS += "${PYTHON_PN}-pytest-runner-native"

inherit setuptools3 systemd

SYSTEMD_SERVICE_${PN} = "labgrid-powerrelay.service"

do_install_append() {
rm -rf "${D}${datadir}"
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/labgrid-powerrelay.service ${D}${systemd_system_unitdir}/
}

FILES_${PN} += "${systemd_system_unitdir}"

0 comments on commit 1c5a62b

Please sign in to comment.