Patchwork [6/6] libmime-types-perl: add recipe

login
register
mail settings
Submitter Kang Kai
Date Aug. 14, 2014, 9:13 a.m.
Message ID <1408007615-23880-7-git-send-email-kai.kang@windriver.com>
Download mbox | patch
Permalink /patch/78191/
State Accepted, archived
Headers show

Comments

Kang Kai - Aug. 14, 2014, 9:13 a.m.
Add recipe for libmime-types-perl. Enable to create ptest sub-package at
same time.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-perl/recipes-perl/libmime/files/run-ptest     | 16 +++++++++++++
 .../libmime/libmime-types-perl_2.04.bb             | 26 ++++++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 meta-perl/recipes-perl/libmime/files/run-ptest
 create mode 100644 meta-perl/recipes-perl/libmime/libmime-types-perl_2.04.bb

Patch

diff --git a/meta-perl/recipes-perl/libmime/files/run-ptest b/meta-perl/recipes-perl/libmime/files/run-ptest
new file mode 100644
index 0000000..c9f9ca9
--- /dev/null
+++ b/meta-perl/recipes-perl/libmime/files/run-ptest
@@ -0,0 +1,16 @@ 
+#!/bin/sh
+
+for case in `find t -type f -name '*.t'`; do
+    perl $case >$case.output 2>&1
+    ret=$?
+    cat $case.output
+    if [ $ret -ne 0 ]; then
+        echo "FAIL: ${case%.t}"
+    elif grep -i 'SKIP' $case.output; then
+        echo "SKIP: ${case%.t}"
+    else
+        echo "PASS: ${case%.t}"
+    fi
+
+    rm -f $case.output
+done
diff --git a/meta-perl/recipes-perl/libmime/libmime-types-perl_2.04.bb b/meta-perl/recipes-perl/libmime/libmime-types-perl_2.04.bb
new file mode 100644
index 0000000..ef53029
--- /dev/null
+++ b/meta-perl/recipes-perl/libmime/libmime-types-perl_2.04.bb
@@ -0,0 +1,26 @@ 
+SUMMARY = "MIME::Types - Definition of MIME types"
+DESCRIPTION = "MIME types are used in MIME compliant lines, for instance \
+as part of e-mail and HTTP traffic, to indicate the type of content which \
+is transmitted. Sometimes real knowledge about a mime-type is need.\
+\n\
+This module maintains a set of MIME::Type objects, which each describe \
+one known mime type."
+HOMEPAGE = "http://search.cpan.org/~markov/MIME-Types-${PV}"
+SECTION = "libraries"
+
+LICENSE = "Artistic-1.0|GPLv1+"
+LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=11;md5=963ce28228347875ace682de56eef8e8"
+
+SRC_URI = "http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MIME-Types-${PV}.tar.gz \
+           file://run-ptest \
+          "
+SRC_URI[md5sum] = "e292bbf7756bb4999407f3f660697168"
+SRC_URI[sha256sum] = "22b6069d372d587b1f2ecc6d0aaf50fb5c64920caed8c214b9884e64538acc8f"
+
+S = "${WORKDIR}/MIME-Types-${PV}"
+
+inherit cpan ptest
+
+do_install_ptest () {
+    cp -r ${B}/t ${D}${PTEST_PATH}
+}