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.

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