From 1350ccacbc00c971d13af6781ef9045d99cf06c1 Mon Sep 17 00:00:00 2001 From: Alex Gonzalez Date: Mon, 17 Dec 2012 17:50:43 +0100 Subject: [PATCH] meta-digi-del: Add stunnel from openembedded classic. Signed-off-by: Alex Gonzalez --- .../recipes-connectivity/stunnel/files/init | 34 +++++++++++++++++++ .../stunnel/files/stunnel.conf | 6 ++++ .../stunnel/stunnel-4.54/automake.patch | 12 +++++++ .../recipes-connectivity/stunnel/stunnel.inc | 26 ++++++++++++++ .../stunnel/stunnel_4.54.bb | 9 +++++ 5 files changed, 87 insertions(+) create mode 100644 meta-digi-del/recipes-connectivity/stunnel/files/init create mode 100644 meta-digi-del/recipes-connectivity/stunnel/files/stunnel.conf create mode 100644 meta-digi-del/recipes-connectivity/stunnel/stunnel-4.54/automake.patch create mode 100644 meta-digi-del/recipes-connectivity/stunnel/stunnel.inc create mode 100644 meta-digi-del/recipes-connectivity/stunnel/stunnel_4.54.bb diff --git a/meta-digi-del/recipes-connectivity/stunnel/files/init b/meta-digi-del/recipes-connectivity/stunnel/files/init new file mode 100644 index 000000000..8f0a0139b --- /dev/null +++ b/meta-digi-del/recipes-connectivity/stunnel/files/init @@ -0,0 +1,34 @@ +#!/bin/sh +DAEMON=/usr/sbin/stunnel +NAME=stunnel +DESC="SSH Tunneling" +ARGS="" + +test -f $DAEMON || exit 0 + +set -e + +case "$1" in + start) + echo -n "* starting $DESC: $NAME... " + start-stop-daemon -S -x $DAEMON -- $ARGS + echo "done." + ;; + stop) + echo -n "* stopping $DESC: $NAME... " + start-stop-daemon -K -x $DAEMON + echo "done." + ;; + restart) + echo "* restarting $DESC: $NAME... " + $0 stop + $0 start + echo "done." + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/meta-digi-del/recipes-connectivity/stunnel/files/stunnel.conf b/meta-digi-del/recipes-connectivity/stunnel/files/stunnel.conf new file mode 100644 index 000000000..0deb1a0f4 --- /dev/null +++ b/meta-digi-del/recipes-connectivity/stunnel/files/stunnel.conf @@ -0,0 +1,6 @@ +key=/etc/certs/mtx.key +cert=/etc/certs/mtx.crt + +[https] +accept=443 +connect=80 diff --git a/meta-digi-del/recipes-connectivity/stunnel/stunnel-4.54/automake.patch b/meta-digi-del/recipes-connectivity/stunnel/stunnel-4.54/automake.patch new file mode 100644 index 000000000..ea93933ab --- /dev/null +++ b/meta-digi-del/recipes-connectivity/stunnel/stunnel-4.54/automake.patch @@ -0,0 +1,12 @@ +Index: stunnel-4.09/Makefile.am +=================================================================== +--- stunnel-4.09.orig/Makefile.am 2004-10-10 01:37:15.000000000 -0400 ++++ stunnel-4.09/Makefile.am 2005-04-01 22:09:06.819735144 -0500 +@@ -1,6 +1,6 @@ + ## Process this file with automake to produce Makefile.in + +-SUBDIRS = src doc tools ++SUBDIRS = src doc + + # extra_src = src/gui.c src/resources.rc src/stunnel.ico src/stunnel.exe + # extra_doc = doc/stunnel.pod doc/stunnel.8 doc/stunnel.html doc/en doc/pl diff --git a/meta-digi-del/recipes-connectivity/stunnel/stunnel.inc b/meta-digi-del/recipes-connectivity/stunnel/stunnel.inc new file mode 100644 index 000000000..c708cdb6e --- /dev/null +++ b/meta-digi-del/recipes-connectivity/stunnel/stunnel.inc @@ -0,0 +1,26 @@ +SECTION = "console/network" +DEPENDS = "openssl" +HOMEPAGE = "http://www.stunnel.org" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=06715c92fdfd7a3dcf901b26b162b64c" +DESCRIPTION = "Stunnel is a program that allows you to encrypt \ +arbitrary TCP connections inside SSL" + +S = "${WORKDIR}/stunnel-${PV}" + +inherit autotools update-rc.d + +INITSCRIPT_NAME = "stunnel" +INITSCRIPT_PARAMS = "defaults" + +EXTRA_OECONF = "--with-ssl=${STAGING_LIBDIR}/.. \ + --with-random=/dev/urandom \ + --with-ptmx \ + --without-ptc" + +do_install() { + autotools_do_install + install -d ${D}${sysconfdir}/stunnel ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/stunnel + install -m 644 ${WORKDIR}/stunnel.conf ${D}${sysconfdir}/stunnel +} diff --git a/meta-digi-del/recipes-connectivity/stunnel/stunnel_4.54.bb b/meta-digi-del/recipes-connectivity/stunnel/stunnel_4.54.bb new file mode 100644 index 000000000..301f2eb4d --- /dev/null +++ b/meta-digi-del/recipes-connectivity/stunnel/stunnel_4.54.bb @@ -0,0 +1,9 @@ +require stunnel.inc + +SRC_URI = "http://www.stunnel.org/downloads/stunnel-${PV}.tar.gz \ + file://automake.patch \ + file://init \ + file://stunnel.conf" + +SRC_URI[md5sum] = "c2b1db99e3ed547214568959a8ed18ac" +SRC_URI[sha256sum] = "b7e1b9e63569574dbdabee8af90b8ab88db3fe13dcb1268d59a1408c56e6de7b"