Skip to content

Commit 1c5a62b

Browse files
prevas-jdtnjluebbe
authored andcommitted
labgrid-powerrelay: add recipe
Rest api for control gpio chips Signed-off-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
1 parent 3d55e0c commit 1c5a62b

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=Powerrelay init
3+
After=network-online.target
4+
Wants=network-online.target
5+
6+
[Service]
7+
Type=simple
8+
Environment="LC_ALL=C.UTF-8"
9+
Environment="LANG=C.UTF-8"
10+
11+
ExecStart=/usr/bin/powerrelay run /etc/powerrelay/config.yaml
12+
13+
[Install]
14+
WantedBy=multi-user.target
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
DESCRIPTION = "REST API to control GPIO chips"
2+
HOMEPAGE = "https://github.com/prevas-dk/labgrid-powerrelay"
3+
LICENSE = "MIT"
4+
LIC_FILES_CHKSUM = "file://LICENSE;md5=20796caa814f193af92c180d146bb7ec"
5+
6+
RDEPENDS_${PN} = " \
7+
python3-click \
8+
python3-aiohttp \
9+
python3-trafaret \
10+
python3-trafaret-config \
11+
python3-aiohttp-jinja2 \
12+
python3-yarl \
13+
python3-multidict \
14+
"
15+
16+
SRC_URI = " \
17+
git://github.com/prevas-dk/labgrid-powerrelay.git;protocol=https;branch=master \
18+
file://labgrid-powerrelay.service \
19+
"
20+
SRCREV = "bf5d2e11e0f594757d3d97a6a9f38480713aaace"
21+
22+
S = "${WORKDIR}/git"
23+
24+
DEPENDS += "${PYTHON_PN}-pytest-runner-native"
25+
26+
inherit setuptools3 systemd
27+
28+
SYSTEMD_SERVICE_${PN} = "labgrid-powerrelay.service"
29+
30+
do_install_append() {
31+
rm -rf "${D}${datadir}"
32+
install -d ${D}${systemd_system_unitdir}
33+
install -m 0644 ${WORKDIR}/labgrid-powerrelay.service ${D}${systemd_system_unitdir}/
34+
}
35+
36+
FILES_${PN} += "${systemd_system_unitdir}"

0 commit comments

Comments
 (0)