]> Untitled Git - mpdstream/commitdiff
Add yocto recipe template
authorHugo Villeneuve <hugo@hugovil.com>
Tue, 31 Mar 2026 20:30:40 +0000 (16:30 -0400)
committerHugo Villeneuve <hvilleneuve@dimonoff.com>
Wed, 1 Apr 2026 23:38:12 +0000 (19:38 -0400)
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
.gitignore
configure.ac
data/Makefile.am
data/yocto_mpdstream_git.bb.in [new file with mode: 0644]

index 1f0e924496a4f8ae17ccdaed7ba0e1b0dff780c8..38025f46b9017a574bffcf7fdefae6266539ae4c 100644 (file)
@@ -21,3 +21,4 @@ m4/lt~obsolete.m4
 build-aux/ltmain.sh
 libtool
 data/mpdstream.service
+data/yocto_mpdstream_git.bb
index c20e733f1f0654c33ea0093f64ac6c6732faf7d5..8539caa6f6358748bbccbf311a8829dd29646b49 100644 (file)
@@ -62,6 +62,12 @@ if  test "x${with_systemd}" = xyes ; then
     AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
 fi
 
+dnl For substitution in yocto recipe:
+GIT_BRANCH=`git branch --show-current 2>/dev/null || echo "master"`
+GIT_REVISION=`git rev-parse HEAD 2>/dev/null || echo "\${AUTOREV}"`
+AC_SUBST([GIT_BRANCH])
+AC_SUBST([GIT_REVISION])
+
 AC_SUBST(WARNINGCFLAGS)
 AC_SUBST(ac_aux_dir)
 
@@ -69,6 +75,7 @@ dnl Creating output file(s)
 AC_CONFIG_FILES([Makefile
     data/Makefile
     data/mpdstream.service
+    data/yocto_mpdstream_git.bb
     doc/Makefile
     src/Makefile
 ])
index 42ea05705f11bac789ffba4265056311e71dd218..d9d0ac860a0caee30f045a87f019d9906455259d 100644 (file)
@@ -5,7 +5,8 @@ systemdsystemunit_DATA = mpdstream.service
 systemdsystemunitdir = @systemdsystemunitdir@
 
 EXTRA_DIST = \
-    mpdstream.service
+    mpdstream.service \
+    yocto_mpdstream_git.bb
 
 CLEANFILES = *~
 
diff --git a/data/yocto_mpdstream_git.bb.in b/data/yocto_mpdstream_git.bb.in
new file mode 100644 (file)
index 0000000..a611702
--- /dev/null
@@ -0,0 +1,26 @@
+DESCRIPTION = "Tool to automatically restart broken MPD internet streams"
+LICENSE = "GPL-2.0-or-later"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c"
+
+DEPENDS = " libmpdclient systemd"
+
+PV = "@PACKAGE_VERSION@"
+SRCBRANCH = "@GIT_BRANCH@"
+SRCREV = "@GIT_REVISION@"
+SRC_URI = "git://git.hugovil.com/git/mpdstream;protocol=http;branch=${SRCBRANCH}"
+
+inherit autotools pkgconfig systemd
+
+do_configure:prepend() {
+    saved_dir=$(pwd)
+    cd ${S}; ./autogen.sh
+    cd ${saved_dir}
+}
+
+EXTRA_OECONF = " \
+    --with-systemd \
+"
+
+SYSTEMD_SERVICE:${PN} = " \
+    ${PN}.service \
+"