[Packages] devio:
[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
12 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
13 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
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://stunnel.org
23 endef
24
25 define Package/stunnel/description
26 Open source SSL TCP Wrapper
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/sbin $(1)/usr/lib $(1)/usr/stunnel
48 $(INSTALL_DIR) $(1)/etc/stunnel $(1)/etc/init.d
49 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/stunnel $(1)/usr/sbin/
50 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstunnel.so $(1)/usr/sbin/
51 $(CP) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
52 $(CP) ./files/stunnel.init $(1)/etc/init.d/S90stunnel
53 endef
54
55 $(eval $(call BuildPackage,stunnel))