Add ympd recipe
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 5 Jan 2023 16:27:00 +0000 (11:27 -0500)
committerHugo Villeneuve <hugo@hugovil.com>
Wed, 1 Mar 2023 17:10:15 +0000 (12:10 -0500)
Use ympd git repo from hugovil.com.

recipes-core/images/image-hvmpd-common.inc
recipes-multimedia/musicpd/ympd.bb [new file with mode: 0644]

index 64eefbe..34a132f 100644 (file)
@@ -23,6 +23,7 @@ IMAGE_INSTALL:append = " \
        alsa-utils \
        mpd \
        mpc \
+       ympd \
 "
 
 IMAGE_INSTALL:append = " \
diff --git a/recipes-multimedia/musicpd/ympd.bb b/recipes-multimedia/musicpd/ympd.bb
new file mode 100644 (file)
index 0000000..016665d
--- /dev/null
@@ -0,0 +1,45 @@
+DESCRIPTION = "MPD Web GUI - written in C, utilizing Websockets and Bootstrap/JS"
+SECTION = "multimedia"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
+
+PV = "1.2.3+git${SRCPV}"
+
+DEPENDS += "libmpdclient openssl"
+
+SRCBRANCH = "hvmpd"
+SRCREV = "${AUTOREV}"
+
+# Original URI: git://github.com/SuperBFG7/ympd.git
+SRC_URI = "git://git.hugovil.com/git/ympd.git;protocol=http;branch=${SRCBRANCH}"
+
+S = "${WORKDIR}/git"
+
+inherit pkgconfig cmake systemd
+
+do_install() {
+    install -d ${D}${bindir}
+    install -m 0755 ympd ${D}${bindir}
+
+    install -d ${D}${sysconfdir}/default
+    install -m 0644 ${S}/contrib/ympd.default ${D}${sysconfdir}/default/ympd
+
+    install -d ${D}${systemd_unitdir}/system
+
+    sed -i -e 's:^\(Description=.*\):\1\nAfter=mpd.service:g'   ${S}/contrib/ympd.service
+
+    # These options require a kernel compiled with CONFIG_USER_NS:
+    sed -i -e 's:^\(PrivateUsers=.*\):#\1:g'   ${S}/contrib/ympd.service
+    sed -i -e 's:^\(PrivateTmp=.*\):#\1:g'     ${S}/contrib/ympd.service
+    sed -i -e 's:^\(PrivateDevices=.*\):#\1:g' ${S}/contrib/ympd.service
+    install -m 0644 ${S}/contrib/ympd.service ${D}${systemd_unitdir}/system
+}
+
+FILES:${PN} = " \
+    ${systemd_unitdir}/system/ympd.service \
+    ${sysconfdir}/default/ympd \
+    ${bindir}/ympd \
+"
+
+SYSTEMD_AUTO_ENABLE = "enable"
+SYSTEMD_SERVICE:${PN} = "ympd.service"