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