cfffd3af135dbb39e08fe72df82e8a74fc224f6d
[openwrt/svn-archive/archive.git] / net / stunnel / Makefile
1 # $Id$
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=stunnel
6 PKG_VERSION:=4.20
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=cf9940395d3503018f721c962528d2ec
9 PKG_SOURCE_URL:=http://www.stunnel.org/download/stunnel/src/
10 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
11 PKG_CAT:=zcat
12
13 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
14 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/stunnel
19 SECTION:=net
20 CATEGORY:=Network
21 DEPENDS:=+libopenssl +libwrap
22 TITLE:=SSL TCP Wrapper
23 URL:=http://stunnel.org
24 endef
25
26 define Package/stunnel/description
27 Open source SSL TCP Wrapper
28 endef
29
30
31 define Build/Configure
32 $(call Build/Configure/Default, \
33 --with-random=/dev/urandom \
34 --with-threads=fork \
35 --with-ssl=$(STAGING_DIR)/usr \
36 )
37 endef
38
39 define Build/Compile
40 mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
41 echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
42 $(MAKE) -C $(PKG_BUILD_DIR) \
43 DESTDIR="$(PKG_INSTALL_DIR)" \
44 all install
45 endef
46
47 define Package/stunnel/install
48 $(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib $(1)/usr/stunnel
49 $(INSTALL_DIR) $(1)/etc/stunnel $(1)/etc/init.d
50 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/stunnel $(1)/usr/sbin/
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstunnel.so $(1)/usr/sbin/
52 $(CP) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
53 $(CP) ./files/stunnel.init $(1)/etc/init.d/S90stunnel
54 endef
55
56 $(eval $(call BuildPackage,stunnel))