2 # Copyright (C) 2006-2010 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
14 PKG_SOURCE_URL:=http://www.stunnel.org/download/stunnel/src/
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_MD5SUM:=559a864066d8cc4afd8a97682c90d41c
21 include $(INCLUDE_DIR)/package.mk
23 define Package/stunnel
26 DEPENDS:=+libopenssl +libwrap
27 TITLE:=SSL TCP Wrapper
28 URL:=http://www.stunnel.org/
31 define Package/stunnel/description
32 Stunnel is a program that allows you to encrypt arbitrary TCP
33 connections inside SSL (Secure Sockets Layer) available on both Unix
34 and Windows. Stunnel can allow you to secure non-SSL aware daemons and
35 protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
36 encryption, requiring no changes to the daemon's code.
39 define Package/stunnel/conffiles
40 /etc/stunnel/stunnel.conf
44 --with-random=/dev/urandom \
46 --with-ssl=$(STAGING_DIR)/usr \
49 mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
50 echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
51 $(call Build/Compile/Default)
54 define Package/stunnel/install
55 $(INSTALL_DIR) $(1)/usr/bin
56 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
57 $(INSTALL_DIR) $(1)/usr/lib/stunnel
58 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
59 $(INSTALL_DIR) $(1)/etc/stunnel
60 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.conf-sample $(1)/etc/stunnel/stunnel.conf
61 $(INSTALL_DIR) $(1)/etc/init.d
62 $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
65 $(eval $(call BuildPackage,stunnel))