You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
2.4 KiB

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