2 # Copyright (C) 2006-2014 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
15 PKG_MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net>
16 PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
19 http://ftp.nluug.nl/pub/networking/stunnel/ \
20 http://www.usenix.org.uk/mirrors/stunnel/
21 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
22 PKG_MD5SUM:=09ada29ba1683ab1fd1f31d7bed8305127a0876537e836a40cb83851da034fd5
27 include $(INCLUDE_DIR)/package.mk
29 define Package/stunnel
32 DEPENDS:=+libopenssl +zlib +libpthread
33 TITLE:=SSL TCP Wrapper
34 URL:=http://www.stunnel.org/
37 define Package/stunnel/description
38 Stunnel is a program that allows you to encrypt arbitrary TCP
39 connections inside SSL (Secure Sockets Layer) available on both Unix
40 and Windows. Stunnel can allow you to secure non-SSL aware daemons and
41 protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
42 encryption, requiring no changes to the daemon's code.
45 define Package/stunnel/conffiles
46 /etc/stunnel/stunnel.conf
51 --with-random=/dev/urandom \
52 --with-threads=pthread \
53 --with-ssl=$(STAGING_DIR)/usr \
57 ifeq ($(CONFIG_IPV6),n)
63 mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
64 echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
65 $(call Build/Compile/Default)
68 define Package/stunnel/install
69 $(INSTALL_DIR) $(1)/usr/bin
70 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
71 $(INSTALL_DIR) $(1)/usr/lib/stunnel
72 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
73 $(INSTALL_DIR) $(1)/etc/stunnel
74 $(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
75 $(INSTALL_DIR) $(1)/etc/init.d
76 $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
79 $(eval $(call BuildPackage,stunnel))