Merge pull request #4253 from dibdot/package-adblock
[feed/packages.git] / net / stunnel / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=stunnel
11 PKG_VERSION:=5.41
12 PKG_RELEASE:=1
13
14 PKG_LICENSE:=GPL-2.0+
15 PKG_MAINTAINER:=Daniel Engberg <daniel.engberg.lists@pyret.net>
16 PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
17
18 PKG_SOURCE_URL:= \
19 http://ftp.nluug.nl/pub/networking/stunnel/ \
20 http://www.usenix.org.uk/mirrors/stunnel/ \
21 https://www.stunnel.org/downloads/
22 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
23 PKG_HASH:=f05c6321ee1f6ddebacc234ccf20825971941e831b5beea6d0ce0b8e1668148f
24
25 PKG_FIXUP:=autoreconf
26 PKG_INSTALL:=1
27
28 include $(INCLUDE_DIR)/package.mk
29
30 define Package/stunnel
31 SECTION:=net
32 CATEGORY:=Network
33 DEPENDS:=+libopenssl +zlib +libpthread
34 TITLE:=SSL TCP Wrapper
35 URL:=http://www.stunnel.org/
36 endef
37
38 define Package/stunnel/description
39 Stunnel is a program that allows you to encrypt arbitrary TCP
40 connections inside SSL (Secure Sockets Layer) available on both Unix
41 and Windows. Stunnel can allow you to secure non-SSL aware daemons and
42 protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
43 encryption, requiring no changes to the daemon's code.
44 endef
45
46 define Package/stunnel/conffiles
47 /etc/stunnel/stunnel.conf
48 endef
49
50
51 CONFIGURE_ARGS+= \
52 --with-random=/dev/urandom \
53 --with-threads=pthread \
54 --with-ssl=$(STAGING_DIR)/usr \
55 --disable-libwrap \
56 --disable-systemd
57
58 ifeq ($(CONFIG_IPV6),n)
59 CONFIGURE_ARGS+= \
60 --disable-ipv6
61 endif
62
63 define Build/Compile
64 mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
65 echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
66 $(call Build/Compile/Default)
67 endef
68
69 define Package/stunnel/install
70 $(INSTALL_DIR) $(1)/usr/bin
71 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
72 $(INSTALL_DIR) $(1)/usr/lib/stunnel
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
74 $(INSTALL_DIR) $(1)/etc/stunnel
75 $(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
76 $(INSTALL_DIR) $(1)/etc/init.d
77 $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
78 endef
79
80 $(eval $(call BuildPackage,stunnel))