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.

85 lines
2.3 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.48
  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. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  19. PKG_HASH:=1011d5a302ce6a227882d094282993a3187250f42f8a801dcc1620da63b2b8df
  20. PKG_FIXUP:=autoreconf
  21. PKG_FIXUP:=patch-libtool
  22. PKG_INSTALL:=1
  23. include $(INCLUDE_DIR)/package.mk
  24. define Package/stunnel
  25. SECTION:=net
  26. CATEGORY:=Network
  27. DEPENDS:=+libopenssl +zlib +libpthread
  28. TITLE:=SSL TCP Wrapper
  29. URL:=http://www.stunnel.org/
  30. endef
  31. define Package/stunnel/description
  32. Stunnel is a program that allows you to encrypt arbitrary TCP
  33. connections inside SSL (Secure Sockets Layer) available on both Unix
  34. and Windows. Stunnel can allow you to secure non-SSL aware daemons and
  35. protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the
  36. encryption, requiring no changes to the daemon's code.
  37. endef
  38. define Package/stunnel/conffiles
  39. /etc/stunnel/stunnel.conf
  40. /etc/config/stunnel
  41. endef
  42. CONFIGURE_ARGS+= \
  43. --with-random=/dev/urandom \
  44. --with-threads=pthread \
  45. --with-ssl=$(STAGING_DIR)/usr \
  46. --disable-libwrap \
  47. --disable-systemd \
  48. --disable-fips
  49. ifeq ($(CONFIG_IPV6),n)
  50. CONFIGURE_ARGS+= \
  51. --disable-ipv6
  52. endif
  53. define Build/Compile
  54. mkdir -p $(PKG_INSTALL_DIR)/etc/stunnel
  55. echo '#dummy' > $(PKG_INSTALL_DIR)/etc/stunnel/stunnel.pem
  56. $(call Build/Compile/Default)
  57. endef
  58. define Package/stunnel/install
  59. $(INSTALL_DIR) $(1)/usr/bin
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/stunnel $(1)/usr/bin/
  61. $(INSTALL_DIR) $(1)/usr/lib/stunnel
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/stunnel/libstunnel.so $(1)/usr/lib/stunnel/
  63. $(INSTALL_DIR) $(1)/etc/stunnel
  64. $(INSTALL_CONF) ./files/stunnel.conf $(1)/etc/stunnel/stunnel.conf
  65. $(INSTALL_DIR) $(1)/etc/init.d
  66. $(INSTALL_BIN) ./files/stunnel.init $(1)/etc/init.d/stunnel
  67. $(INSTALL_DIR) $(1)/etc/config
  68. $(INSTALL_CONF) ./files/stunnel.uci $(1)/etc/config/stunnel
  69. endef
  70. $(eval $(call BuildPackage,stunnel))