c2a34e1a1c29be999258d7845f0aea15df971551
[openwrt/svn-archive/archive.git] / net / stunnel / Makefile
1 # $Id: Makefile 1146 2005-06-05 13:32:28Z nbd $
2
3 include $(TOPDIR)/rules.mk
4
5 PKG_NAME:=stunnel
6 PKG_VERSION:=4.16
7 PKG_RELEASE:=1
8 PKG_MD5SUM:=8ea5cae3eeaacc0271b766506b4b9d4a
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 DESCRIPTION:=\
24 Open source SSL TCP Wrapper
25 URL:=http://stunnel.org
26 endef
27
28
29 define Build/Configure
30 $(call Build/Configure/Default, \
31 --with-random=/dev/urandom \
32 --with-threads=fork \
33 )
34 endef
35
36 define Build/Compile
37 $(MAKE) -C $(PKG_BUILD_DIR) \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 all install
40 endef
41
42 define Package/stunnel/install
43 install -d -m0755 $(1)/usr/sbin $(1)/usr/lib $(1)/usr/stunnel
44 install -d -m0755 $(1)/etc/stunnel $(1)/etc/init.d
45 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/stunnel $(1)/usr/sbin/
46 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libstunnel.so $(1)/usr/sbin/
47 $(CP) $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem $(1)/etc/stunnel/
48 $(CP) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
49 $(CP) ./files/stunnel.init $(1)/etc/init.d/S90stunnel
50 endef
51
52 $(eval $(call BuildPackage,stunnel))