mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 05:49:23 +00:00
dropbear: move dropbear-systemd to a bbappend
While on it, the recipe has been updated to use systemd.bbclass and cleaned up. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
@@ -1,40 +0,0 @@
|
|||||||
DESCRIPTION = "Socket based activation for dropbear ssh server"
|
|
||||||
LICENSE = "MIT"
|
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
|
||||||
|
|
||||||
inherit allarch
|
|
||||||
|
|
||||||
SRC_URI = "file://dropbearkey.service \
|
|
||||||
file://dropbear@.service \
|
|
||||||
file://dropbear.socket \
|
|
||||||
"
|
|
||||||
|
|
||||||
do_configure() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
do_compile() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
do_install() {
|
|
||||||
install -d ${D}${base_libdir}/systemd/system
|
|
||||||
install -m 0644 ${WORKDIR}/dropbear*.* ${D}${base_libdir}/systemd/system/
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst_${PN} () {
|
|
||||||
if test "x$D" != "x"; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
systemctl enable dropbear.socket
|
|
||||||
ln -sf /dev/null ${base_libdir}/systemd/system/dropbear.service
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm_${PN} () {
|
|
||||||
systemctl disable dropbear.socket
|
|
||||||
rm -f ${base_libdir}/systemd/system/dropbear.service
|
|
||||||
}
|
|
||||||
|
|
||||||
RDEPENDS_${PN} = "systemd dropbear"
|
|
||||||
FILES_${PN} = "${base_libdir}/systemd/system"
|
|
||||||
|
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
inherit systemd
|
||||||
|
|
||||||
|
PR .= ".meta-oe.1"
|
||||||
|
|
||||||
|
# look for files in the layer first
|
||||||
|
FILESEXTRAPATHS := "${THISDIR}/${PN}"
|
||||||
|
|
||||||
|
SRC_URI += "file://dropbearkey.service \
|
||||||
|
file://dropbear@.service \
|
||||||
|
file://dropbear.socket"
|
||||||
|
|
||||||
|
SYSTEMD_PACKAGES = "${PN}-systemd"
|
||||||
|
SYSTEMD_SERVICE_${PN}-systemd = "dropbear.socket"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
install -d ${D}${base_libdir}/systemd/system
|
||||||
|
install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${base_libdir}/systemd/system/
|
||||||
|
install -m 0644 ${WORKDIR}/dropbear@.service ${D}${base_libdir}/systemd/system/
|
||||||
|
install -m 0644 ${WORKDIR}/dropbear.socket ${D}${base_libdir}/systemd/system/
|
||||||
|
}
|
||||||
|
|
||||||
|
PACKAGES += "${PN}-systemd"
|
||||||
|
|
||||||
|
RDEPENDS_${PN}-systemd += "dropbear"
|
||||||
|
FILES_${PN}-systemd = "${base_libdir}/systemd"
|
||||||
|
|
||||||
|
pkg_postinst_${PN}-systemd_append() {
|
||||||
|
ln -sf /dev/null $D${base_libdir}/systemd/system/dropbear.service
|
||||||
|
}
|
||||||
|
|
||||||
|
pkg_postrm_${PN}-systemd_append() {
|
||||||
|
rm -f ${base_libdir}/systemd/system/dropbear.service
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user