summaryrefslogtreecommitdiff
path: root/recipes/stunnel
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/stunnel')
-rw-r--r--recipes/stunnel/files/init34
-rw-r--r--recipes/stunnel/files/stunnel.conf6
-rw-r--r--recipes/stunnel/stunnel-4.09/automake.patch12
-rw-r--r--recipes/stunnel/stunnel-4.09/configure.patch37
-rw-r--r--recipes/stunnel/stunnel.inc25
-rw-r--r--recipes/stunnel/stunnel_4.09.bb7
6 files changed, 121 insertions, 0 deletions
diff --git a/recipes/stunnel/files/init b/recipes/stunnel/files/init
new file mode 100644
index 0000000000..8f0a0139b5
--- /dev/null
+++ b/recipes/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/recipes/stunnel/files/stunnel.conf b/recipes/stunnel/files/stunnel.conf
new file mode 100644
index 0000000000..0deb1a0f46
--- /dev/null
+++ b/recipes/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/recipes/stunnel/stunnel-4.09/automake.patch b/recipes/stunnel/stunnel-4.09/automake.patch
new file mode 100644
index 0000000000..ea93933aba
--- /dev/null
+++ b/recipes/stunnel/stunnel-4.09/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/recipes/stunnel/stunnel-4.09/configure.patch b/recipes/stunnel/stunnel-4.09/configure.patch
new file mode 100644
index 0000000000..1cd7cc2791
--- /dev/null
+++ b/recipes/stunnel/stunnel-4.09/configure.patch
@@ -0,0 +1,37 @@
+Index: stunnel-4.09/configure.ac
+===================================================================
+--- stunnel-4.09.orig/configure.ac 2005-02-28 11:24:17.000000000 -0500
++++ stunnel-4.09/configure.ac 2005-04-01 22:12:06.007494464 -0500
+@@ -35,8 +35,30 @@
+ AC_CHECK_SIZEOF(unsigned long)
+
+ AC_MSG_NOTICE([**************************************** PTY device files])
+-AC_CHECK_FILE("/dev/ptmx", AC_DEFINE(HAVE_DEV_PTMX))
+-AC_CHECK_FILE("/dev/ptc", AC_DEFINE(HAVE_DEV_PTS_AND_PTC))
++AC_ARG_WITH(ptmx,
++ [ --with-ptmx /dev/ptmx exists (default: check for existance)],
++ [
++ if test x"$withval" = "xyes"; then
++ AC_DEFINE(HAVE_DEV_PTMX)
++ fi
++ ],
++ [
++ # Check for ptmx device
++ AC_CHECK_FILE("/dev/ptmx", AC_DEFINE(HAVE_DEV_PTMX))
++ ]
++)
++AC_ARG_WITH(ptc,
++ [ --with-ptc /dev/ptc exists (default: check for existance)],
++ [
++ if test x"$withval" = "xyes"; then
++ AC_DEFINE(HAVE_DEV_PTS_AND_PTC)
++ fi
++ ],
++ [
++ # Check for ptc device
++ AC_CHECK_FILE("/dev/ptc", AC_DEFINE(HAVE_DEV_PTS_AND_PTC))
++ ]
++)
+
+ AC_MSG_NOTICE([**************************************** SSL and entropy])
+ checkssldir() { :
diff --git a/recipes/stunnel/stunnel.inc b/recipes/stunnel/stunnel.inc
new file mode 100644
index 0000000000..6be13b8682
--- /dev/null
+++ b/recipes/stunnel/stunnel.inc
@@ -0,0 +1,25 @@
+SECTION = "console/network"
+DEPENDS = "openssl"
+HOMEPAGE = "http://www.stunnel.org"
+LICENSE = "GPL"
+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/recipes/stunnel/stunnel_4.09.bb b/recipes/stunnel/stunnel_4.09.bb
new file mode 100644
index 0000000000..275c8f2a74
--- /dev/null
+++ b/recipes/stunnel/stunnel_4.09.bb
@@ -0,0 +1,7 @@
+require stunnel.inc
+
+SRC_URI = "http://www.stunnel.org/download/stunnel/src/stunnel-${PV}.tar.gz \
+ file://configure.patch;patch=1 \
+ file://automake.patch;patch=1 \
+ file://init \
+ file://stunnel.conf"