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.

88 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_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:=3d6641213a82175c19f23fde1c3d1c841738385289eb7ca1554f4a58b96d955e
  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. --disable-fips
  51. ifeq ($(CONFIG_IPV6),n)
  52. CONFIGURE_ARGS+= \
  53. --disable-ipv6
  54. endif
  55. define Build/Compile
  56. mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
  57. echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
  58. $(call Build/Compile/Default)
  59. endef
  60. define Package/stunnel/install
  61. $(INSTALL_DIR) $(1)/usr/bin
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
  63. $(INSTALL_DIR) $(1)/usr/lib/stunnel
  64. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
  65. $(INSTALL_DIR) $(1)/etc/stunnel
  66. $(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
  67. $(INSTALL_DIR) $(1)/etc/init.d
  68. $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
  69. $(INSTALL_DIR) $(1)/etc/config
  70. $(INSTALL_CONF) ./files/stunnel.uci $(1)/etc/config/stunnel
  71. endef
  72. $(eval $(call BuildPackage,stunnel))