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