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.

93 lines
2.4 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=socat
  7. PKG_VERSION:=1.7.3.4
  8. PKG_RELEASE:=2
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  10. PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
  11. PKG_HASH:=972374ca86f65498e23e3259c2ee1b8f9dbeb04d12c2a78c0c9b5d1cb97dfdfc
  12. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  13. PKG_LICENSE:=GPL-2.0-or-later OpenSSL
  14. PKG_LICENSE_FILES:=COPYING COPYING.OpenSSL
  15. PKG_CPE_ID:=cpe:/a:dest-unreach:socat
  16. PKG_INSTALL:=1
  17. PKG_BUILD_PARALLEL:=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. # PowerPC has different TERMIOS bits
  53. ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
  54. CONFIGURE_VARS += \
  55. sc_cv_sys_crdly_shift=12 \
  56. sc_cv_sys_tabdly_shift=10 \
  57. sc_cv_sys_csize_shift=8
  58. else
  59. CONFIGURE_VARS += \
  60. sc_cv_sys_crdly_shift=9 \
  61. sc_cv_sys_tabdly_shift=11 \
  62. sc_cv_sys_csize_shift=4
  63. endif
  64. CONFIGURE_VARS += \
  65. sc_cv_termios_ispeed="no" \
  66. ac_cv_header_bsd_libutil_h=no \
  67. ac_cv_lib_bsd_openpty=no \
  68. BUILD_DATE=$(SOURCE_DATE_EPOCH)
  69. define Package/socat/install
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
  72. $(INSTALL_DIR) $(1)/etc/config
  73. $(INSTALL_CONF) ./files/socat.config $(1)/etc/config/socat
  74. $(INSTALL_DIR) $(1)/etc/init.d
  75. $(INSTALL_BIN) ./files/socat.init $(1)/etc/init.d/socat
  76. endef
  77. $(eval $(call BuildPackage,socat))