diff mbox series

[meta-oe,3/3] media-types: add recipe

Message ID 20260131215636.2633863-4-skandigraun@gmail.com
State New
Headers show
Series Update and split mime-support | expand

Commit Message

Gyorgy Sarvari Jan. 31, 2026, 9:56 p.m. UTC
This recipe is one of the successors of mime-support, which
provided mailcap and mime.types files. This recipe contains
only the mime.types portion.

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 .../mime-support/media-types_14.0.0.bb        | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 meta-oe/recipes-support/mime-support/media-types_14.0.0.bb
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/mime-support/media-types_14.0.0.bb b/meta-oe/recipes-support/mime-support/media-types_14.0.0.bb
new file mode 100644
index 0000000000..137d508ebe
--- /dev/null
+++ b/meta-oe/recipes-support/mime-support/media-types_14.0.0.bb
@@ -0,0 +1,39 @@ 
+SECTION = "base"
+SUMMARY = "MIME files 'mime.types'"
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://debian/copyright;md5=f3ace4a4ff8aa9e374be6080e41a822e"
+DEPENDS = "file"
+RDEPENDS:${PN} = "perl"
+RRECOMMENDS:${PN} = "file"
+
+SRC_URI = "${DEBIAN_MIRROR}/main/m/${BPN}/${BPN}_${PV}.tar.xz"
+SRC_URI[sha256sum] = "d5877ac8c1fa3661b3c9ace293ae154c844fad686786f085e954c014f7e73f4d"
+S = "${UNPACKDIR}/work"
+
+inherit update-alternatives
+
+FILES:${PN} += " ${datadir}/bug/media-types"
+
+docdir:append = "/${BPN}"
+
+do_install () {
+    install -d ${D}${sysconfdir}
+    install -d ${D}${datadir}/bug/media-types
+    install -d ${D}${docdir}
+    install -m 644 mime.types         ${D}${sysconfdir}/
+    install -m 644 debian/bug-presubj ${D}${datadir}/bug/media-types/presubj
+    install -m 644 debian/changelog   ${D}${docdir}/changelog
+    install -m 644 debian/copyright   ${D}${docdir}/copyright
+    cd ${D}${docdir}; gzip -9v changelog
+}
+
+ALTERNATIVE_PRIORITY = "90"
+ALTERNATIVE:${PN} = "mime.types"
+ALTERNATIVE_LINK_NAME[mime.types] = "${sysconfdir}/mime.types"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+# Debian used to have mime-support package which was media-types and
+# mailcap recipes in one.
+PROVIDES += "mime-support"
+RDEPENDS:mime-support = "mailcap"