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.49
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=GPL-2.0+
  12. PKG_MAINTAINER:=Florian Eckert <fe@dev.tdt.de>
  13. PKG_LICENSE_FILES:=COPYING COPYRIGHT.GPL
  14. PKG_SOURCE_URL:= \
  15. http://ftp.nluug.nl/pub/networking/stunnel/ \
  16. http://www.usenix.org.uk/mirrors/stunnel/ \
  17. https://www.stunnel.org/downloads/ \
  18. https://www.usenix.org.uk/mirrors/stunnel/archive/$(word 1, $(subst .,$(space),$(PKG_VERSION))).x/
  19. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  20. PKG_HASH:=3d6641213a82175c19f23fde1c3d1c841738385289eb7ca1554f4a58b96d955e
  21. PKG_FIXUP:=autoreconf
  22. PKG_FIXUP:=patch-libtool
  23. PKG_INSTALL:=1
  24. include $(INCLUDE_DIR)/package.mk
  25. define Package/stunnel
  26. SECTION:=net
  27. CATEGORY:=Network
  28. DEPENDS:=+libopenssl +zlib +libpthread
  29. TITLE:=SSL TCP Wrapper
  30. URL:=http://www.stunnel.org/
  31. endef
  32. define Package/stunnel/description
  33. Stunnel is a program that allows you to encrypt arbitrary TCP
  34. connections inside SSL (Secure Sockets Layer) available on both Unix
  35. and Windows. Stunnel can allow you to secure non-SSL aware daemons and
  36. protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
  37. encryption, requiring no changes to the daemon's code.
  38. endef
  39. define Package/stunnel/conffiles
  40. /etc/stunnel/stunnel.conf
  41. /etc/config/stunnel
  42. endef
  43. CONFIGURE_ARGS+= \
  44. --with-random=/dev/urandom \
  45. --with-threads=pthread \
  46. --with-ssl=$(STAGING_DIR)/usr \
  47. --disable-libwrap \
  48. --disable-systemd \
  49. --disable-fips
  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))