diff mbox series

[meta-oe] sdmon: add new package

Message ID 20240223114012.699391-1-daniel.ammann@bytesatwork.ch
State Accepted
Headers show
Series [meta-oe] sdmon: add new package | expand

Commit Message

Daniel Ammann Feb. 23, 2024, 11:40 a.m. UTC
Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch>
---
 .../packagegroups/packagegroup-meta-oe.bb     |  1 +
 meta-oe/recipes-support/sdmon/sdmon_git.bb    | 23 +++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 meta-oe/recipes-support/sdmon/sdmon_git.bb

Comments

Khem Raj Feb. 23, 2024, 5:45 p.m. UTC | #1
On Fri, Feb 23, 2024 at 3:40 AM Daniel Ammann
<daniel.ammann@bytesatwork.ch> wrote:
>
> Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch>
> ---
>  .../packagegroups/packagegroup-meta-oe.bb     |  1 +
>  meta-oe/recipes-support/sdmon/sdmon_git.bb    | 23 +++++++++++++++++++
>  2 files changed, 24 insertions(+)
>  create mode 100644 meta-oe/recipes-support/sdmon/sdmon_git.bb
>
> diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
> index 740835b217c..6e2012daea7 100644
> --- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
> +++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
> @@ -874,6 +874,7 @@ RDEPENDS:packagegroup-meta-oe-support ="\
>      raptor2 \
>      rdfind \
>      re2 \
> +    sdmon \
>      sdparm \
>      serial-forward \
>      read-edid \
> diff --git a/meta-oe/recipes-support/sdmon/sdmon_git.bb b/meta-oe/recipes-support/sdmon/sdmon_git.bb
> new file mode 100644
> index 00000000000..8f4b907c948
> --- /dev/null
> +++ b/meta-oe/recipes-support/sdmon/sdmon_git.bb
> @@ -0,0 +1,23 @@
> +SUMMARY = "Get SD card health data"
> +HOMEPAGE = "https://github.com/Ognian/sdmon"
> +
> +LICENSE = "GPL-2.0-only"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
> +
> +SRC_URI = "git://github.com/Ognian/sdmon;protocol=https;branch=master"
> +
> +PV = "0.8.1+git${SRCPV}"

You can drop appending SRCPV here, its no longer needed.

> +SRCREV = "ef1aec457f04a50721f0259651cca9c946f11390"
> +
> +S = "${WORKDIR}/git"
> +
> +do_compile() {
> +       oe_runmake -C ${S}/src CC="${CC}" CFLAGS="${CFLAGS} -D_REENTRANT -DVERSION=\"\\\"${PV}\\\"\"" LDFLAGS="${LDFLAGS}"
> +}
> +
> +do_install() {
> +       install -d ${D}/${bindir}
> +       install -m 0755 ${S}/src/sdmon ${D}${bindir}/sdmon

you can just squash it into single cmd.

 install -Dm 0755 ${S}/src/sdmon ${D}${bindir}/sdmon

> +}
> +
> +FILES:${PN} = "${bindir}/sdmon"

This should happen automatically.

> --
> 2.39.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#109011): https://lists.openembedded.org/g/openembedded-devel/message/109011
> Mute This Topic: https://lists.openembedded.org/mt/104526496/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
index 740835b217c..6e2012daea7 100644
--- a/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
+++ b/meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb
@@ -874,6 +874,7 @@  RDEPENDS:packagegroup-meta-oe-support ="\
     raptor2 \
     rdfind \
     re2 \
+    sdmon \
     sdparm \
     serial-forward \
     read-edid \
diff --git a/meta-oe/recipes-support/sdmon/sdmon_git.bb b/meta-oe/recipes-support/sdmon/sdmon_git.bb
new file mode 100644
index 00000000000..8f4b907c948
--- /dev/null
+++ b/meta-oe/recipes-support/sdmon/sdmon_git.bb
@@ -0,0 +1,23 @@ 
+SUMMARY = "Get SD card health data"
+HOMEPAGE = "https://github.com/Ognian/sdmon"
+
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+SRC_URI = "git://github.com/Ognian/sdmon;protocol=https;branch=master"
+
+PV = "0.8.1+git${SRCPV}"
+SRCREV = "ef1aec457f04a50721f0259651cca9c946f11390"
+
+S = "${WORKDIR}/git"
+
+do_compile() {
+	oe_runmake -C ${S}/src CC="${CC}" CFLAGS="${CFLAGS} -D_REENTRANT -DVERSION=\"\\\"${PV}\\\"\"" LDFLAGS="${LDFLAGS}"
+}
+
+do_install() {
+	install -d ${D}/${bindir}
+	install -m 0755 ${S}/src/sdmon ${D}${bindir}/sdmon
+}
+
+FILES:${PN} = "${bindir}/sdmon"