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.

81 lines
2.0 KiB

  1. #
  2. # Copyright (C) 2006-2015 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:=socat
  9. PKG_VERSION:=1.7.3.2
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
  13. PKG_HASH:=e3561f808739383eb10fada1e5d4f26883f0311b34fd0af7837d0c95ef379251
  14. PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net>
  15. PKG_LICENSE:=GPL-2.0 OpenSSL
  16. PKG_LICENSE_FILES:=COPYING COPYING.OpenSSL
  17. PKG_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/socat
  20. SECTION:=net
  21. CATEGORY:=Network
  22. DEPENDS:=+libpthread +librt +SOCAT_SSL:libopenssl
  23. TITLE:=A multipurpose relay (SOcket CAT)
  24. URL:=http://www.dest-unreach.org/socat/
  25. endef
  26. define Package/socat/description
  27. SoCat (for SOcket CAT) establishes two bidirectional byte streams and
  28. transfers data between them.
  29. Data channels may be files, pipes, devices (terminal or modem, etc.), or
  30. sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking,
  31. logging and tracing, different modes for interprocess communication and
  32. many more options.
  33. endef
  34. define Package/socat/config
  35. config SOCAT_SSL
  36. bool "SSL support"
  37. depends on PACKAGE_socat
  38. default n
  39. help
  40. Implements SSL support in socat (using libopenssl).
  41. endef
  42. define Package/socat/conffiles
  43. /etc/config/socat
  44. endef
  45. CONFIGURE_ARGS += \
  46. --disable-libwrap \
  47. --disable-readline \
  48. --enable-termios
  49. ifneq ($(CONFIG_SOCAT_SSL),y)
  50. CONFIGURE_ARGS+= --disable-openssl
  51. endif
  52. CONFIGURE_VARS += \
  53. sc_cv_termios_ispeed="no" \
  54. sc_cv_sys_crdly_shift=9 \
  55. sc_cv_sys_tabdly_shift=11 \
  56. sc_cv_sys_csize_shift=4
  57. define Package/socat/install
  58. $(INSTALL_DIR) $(1)/usr/bin
  59. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
  60. $(INSTALL_DIR) $(1)/etc/config
  61. $(INSTALL_CONF) ./files/socat.config $(1)/etc/config/socat
  62. $(INSTALL_DIR) $(1)/etc/init.d
  63. $(INSTALL_BIN) ./files/socat.init $(1)/etc/init.d/socat
  64. endef
  65. $(eval $(call BuildPackage,socat))