Merge pull request #17303 from CarlosDerSeher/feature_bt_agent
[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.62
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_LICENSE:=GPL-2.0-or-later
15 PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
16 PKG_LICENSE_FILES:=COPYING.md COPYRIGHT.md
17 PKG_CPE_ID:=cpe:/a:stunnel:stunnel
18
19 PKG_SOURCE_URL:= \
20 http://ftp.nluug.nl/pub/networking/stunnel/ \
21 http://www.usenix.org.uk/mirrors/stunnel/ \
22 https://www.stunnel.org/downloads/ \
23 https://www.usenix.org.uk/mirrors/stunnel/archive/$(word 1, $(subst .,$(space),$(PKG_VERSION))).x/
24
25 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
26 PKG_HASH:=9cf5bb949022aa66c736c1326554cca27d0641605a6370274edc4951eb5bd339
27
28 PKG_FIXUP:=autoreconf
29 PKG_FIXUP:=patch-libtool
30 PKG_INSTALL:=1
31
32 include $(INCLUDE_DIR)/package.mk
33
34 define Package/stunnel
35 SECTION:=net
36 CATEGORY:=Network
37 DEPENDS:=+libopenssl +zlib +libpthread
38 TITLE:=SSL TCP Wrapper
39 URL:=http://www.stunnel.org/
40 endef
41
42 define Package/stunnel/description
43 Stunnel is a program that allows you to encrypt arbitrary TCP
44 connections inside SSL (Secure Sockets Layer) available on both Unix
45 and Windows. Stunnel can allow you to secure non-SSL aware daemons and
46 protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
47 encryption, requiring no changes to the daemon's code.
48 endef
49
50 define Package/stunnel/conffiles
51 /etc/stunnel/stunnel.conf
52 /etc/config/stunnel
53 endef
54
55
56 CONFIGURE_ARGS+= \
57 --with-random=/dev/urandom \
58 --with-threads=pthread \
59 --with-ssl=$(STAGING_DIR)/usr \
60 --disable-libwrap \
61 --disable-systemd
62
63 ifeq ($(CONFIG_IPV6),n)
64 CONFIGURE_ARGS+= \
65 --disable-ipv6
66 endif
67
68 define Build/Compile
69 mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
70 echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
71 $(call Build/Compile/Default)
72 endef
73
74 define Package/stunnel/install
75 $(INSTALL_DIR) $(1)/usr/bin
76 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
77 $(INSTALL_DIR) $(1)/usr/lib/stunnel
78 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
79 $(INSTALL_DIR) $(1)/etc/stunnel
80 $(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
81 $(INSTALL_DIR) $(1)/etc/init.d
82 $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
83 $(INSTALL_DIR) $(1)/etc/config
84 $(INSTALL_CONF) ./files/stunnel.uci $(1)/etc/config/stunnel
85 endef
86
87 $(eval $(call BuildPackage,stunnel))