From patchwork Thu Feb 7 23:56:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [denzil, 01/18] Patch ocf-linux.inc to work with the 2010 and 2012 versions Date: Thu, 07 Feb 2013 23:56:28 -0000 From: Mark Hatle X-Patchwork-Id: 44265 Message-Id: To: From: dhall The 2010 version of the ocf-linux package contains an embedded tar file that has to be expanded. The 2012 version of the package comes with the contents of the tar file extracted in the source tree. This patch to ocf-linux.inc allows it to handle both versions. Signed-off-by: dhall Signed-off-by: Jeff Polk Signed-off-by: Mark Hatle --- meta/recipes-connectivity/openssl/ocf-linux.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meta/recipes-connectivity/openssl/ocf-linux.inc b/meta/recipes-connectivity/openssl/ocf-linux.inc index f4ec7c9..15a553a 100644 --- a/meta/recipes-connectivity/openssl/ocf-linux.inc +++ b/meta/recipes-connectivity/openssl/ocf-linux.inc @@ -9,6 +9,12 @@ SRC_URI = "http://sourceforge.net/projects/ocf-linux/files/ocf-linux/${PV}/ocf-l S = "${WORKDIR}/ocf-linux-${PV}" +get_headers() { + if [ -f ocf-linux.tar.gz ]; then + tar -xf ocf-linux.tar.gz + fi +} + # Need to unpack the the ocf-linux.tar.gz file contained inside the # downloaded tarball # Install the OCF Linux headers so that other packages such as openssl @@ -16,7 +22,10 @@ S = "${WORKDIR}/ocf-linux-${PV}" # the README file. do_install() { cd ${S} - tar xzf ocf-linux.tar.gz + # if ocf-linux.tar.gz exists extract the contents or else go to + # the next do_install step + # Added to maintain compatibility between the 2010 and 2012+ versions + get_headers install -d ${D}${includedir}/crypto install -m 0644 ${S}/ocf/*.h ${D}${includedir}/crypto/ }