summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaik Otto <m.otto@phytec.de>2020-06-04 16:18:40 +0200
committerStefan Müller-Klieser <s.mueller-klieser@phytec.de>2020-06-08 16:33:23 +0200
commitaceff9837016d376a90a96b3b119350603e5ed85 (patch)
tree607d5df351c2ef3da3ec687d9a3a5d339380f8f2
parent666ed7b2a45200656ac7afc96b3a1aafd49acd6a (diff)
downloadmeta-yogurt-aceff9837016d376a90a96b3b119350603e5ed85.tar.bz2
meta-yogurt-aceff9837016d376a90a96b3b119350603e5ed85.zip
phytec-dev-ca: move the install and clean routine in inc file
All basic functionality for installing and cleaning the phytec-dev-ca moved to the include file. Signed-off-by: Maik Otto <m.otto@phytec.de> Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
-rw-r--r--recipes-core/phytec-dev-ca/phytec-dev-ca.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-core/phytec-dev-ca/phytec-dev-ca.inc b/recipes-core/phytec-dev-ca/phytec-dev-ca.inc
new file mode 100644
index 0000000..15dd5b7
--- /dev/null
+++ b/recipes-core/phytec-dev-ca/phytec-dev-ca.inc
@@ -0,0 +1,40 @@
+# Copyright (C) 2020 Maik Otto <m.otto@phytec.de>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "Development PHYTEC CA with test keys.\
+ Please create and use your own certificates and keys!"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit pkgconfig
+
+SRC_URI = " \
+ ftp://ftp.phytec.de/pub/Software/Linux/Applications/phytec-dev-ca-${PV}.tar.gz;name=tarball \
+"
+
+INSANE_SKIP_${PN} += "already-stripped"
+
+S = "${WORKDIR}"
+DEVCA = "phytec-dev-ca"
+
+do_install() {
+ if echo "${CERT_PATH}" | grep -q "${DEVCA}"; then
+ install -d ${CERT_PATH}
+ cp -r ${B}/${DEVCA}/* ${CERT_PATH}
+ fi
+}
+
+do_cleanall_append() {
+ import shutil
+ import os
+ src_uri = (d.getVar('CERT_PATH') or "")
+ devca = (d.getVar('DEVCA') or "")
+ if len(src_uri) == 0:
+ return
+ if devca not in src_uri:
+ return
+ if os.path.exists(src_uri):
+ shutil.rmtree(src_uri)
+}
+
+BBCLASSEXTEND = "native"