[packages] stunnel: add X-Forward-For support for proxying http traffic (#6753)
[openwrt/svn-archive/archive.git] / net / stunnel / Makefile
1
2 include $(TOPDIR)/rules.mk
3
4 PKG_NAME:=stunnel
5 PKG_VERSION:=4.29
6 PKG_RELEASE:=4
7
8 PKG_MD5SUM:=14dc3f8412947f0548975cbce74d6863
9 PKG_SOURCE_URL:=http://www.stunnel.org/download/stunnel/src/
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11
12 PKG_FIXUP:=libtool
13 PKG_INSTALL:=1
14
15 include $(INCLUDE_DIR)/package.mk
16
17 define Package/stunnel
18 SECTION:=net
19 CATEGORY:=Network
20 DEPENDS:=+libopenssl +libwrap
21 TITLE:=SSL TCP Wrapper
22 URL:=http://www.stunnel.org/
23 endef
24
25 define Package/stunnel/description
26 Stunnel is a program that allows you to encrypt arbitrary TCP
27 connections inside SSL (Secure Sockets Layer) available on both Unix
28 and Windows. Stunnel can allow you to secure non-SSL aware daemons and
29 protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
30 encryption, requiring no changes to the daemon's code.
31 endef
32
33 define Package/stunnel/conffiles
34 /etc/stunnel/stunnel.conf
35 endef
36
37 define Build/Configure
38 $(call Build/Configure/Default, \
39 --with-random=/dev/urandom \
40 --with-threads=fork \
41 --with-ssl=$(STAGING_DIR)/usr \
42 )
43 endef
44
45 define Build/Compile
46 mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
47 echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
48 $(call Build/Compile/Default)
49 endef
50
51 define Package/stunnel/install
52 $(INSTALL_DIR) $(1)/usr/bin
53 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
54 $(INSTALL_DIR) $(1)/usr/lib/stunnel
55 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
56 $(INSTALL_DIR) $(1)/etc/stunnel
57 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.conf-sample $(1)/etc/stunnel/stunnel.conf
58 $(INSTALL_DIR) $(1)/etc/init.d
59 $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
60 endef
61
62 $(eval $(call BuildPackage,stunnel))