blob: 999aa11bedae34071e73627a91aa0d150d584e48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
#
# This is the jupyter-lab startup daemon
#
SUMMARY = "Start Jupyter-lab server at system boot"
SRC_URI = " \
file://jupyter_server_config.py \
file://jupyter-setup.sh \
file://jupyter-setup.service \
file://overrides.json \
file://start-jupyter.sh \
"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
JUPYTER_STARTUP_PACKAGES += " \
python3-jupyterlab \
bash \
procps \
"
RDEPENDS:${PN} = " ${JUPYTER_STARTUP_PACKAGES}"
PROVIDES = "start-jupyter"
RPROVIDES:${PN} = "start-jupyter"
inherit update-rc.d systemd
INITSCRIPT_NAME = "jupyter-setup.sh"
INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
SYSTEMD_PACKAGES="${PN}"
SYSTEMD_SERVICE:${PN}="jupyter-setup.service"
SYSTEMD_AUTO_ENABLE:${PN}="disable"
S = "${UNPACKDIR}"
do_install() {
install -d ${D}${datadir}/jupyter/lab/settings
install -m 0644 ${S}/overrides.json ${D}${datadir}/jupyter/lab/settings/
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${S}/jupyter-setup.sh ${D}${sysconfdir}/init.d/jupyter-setup.sh
fi
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${S}/jupyter-setup.service ${D}${systemd_system_unitdir}
install -d ${D}${systemd_user_unitdir}
install -m 0644 ${S}/jupyter-setup.service ${D}${systemd_user_unitdir}
install -d ${D}${base_sbindir}
install -m 0755 ${S}/start-jupyter.sh ${D}${base_sbindir}/start-jupyter.sh
install -d ${D}${sysconfdir}/jupyter/
install -m 0644 ${S}/jupyter_server_config.py ${D}${sysconfdir}/jupyter
}
FILES:${PN} += " \
${base_sbindir} \
${datadir}/jupyter/lab/settings \
${systemd_user_unitdir} \
"
|