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.

92 lines
2.3 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.3
  8. PKG_RELEASE:=3
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  10. PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
  11. PKG_HASH:=0dd63ffe498168a4aac41d307594c5076ff307aa0ac04b141f8f1cec6594d04a
  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_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/socat
  19. SECTION:=net
  20. CATEGORY:=Network
  21. DEPENDS:=+libpthread +librt +SOCAT_SSL:libopenssl
  22. TITLE:=A multipurpose relay (SOcket CAT)
  23. URL:=http://www.dest-unreach.org/socat/
  24. endef
  25. define Package/socat/description
  26. SoCat (for SOcket CAT) establishes two bidirectional byte streams and
  27. transfers data between them.
  28. Data channels may be files, pipes, devices (terminal or modem, etc.), or
  29. sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking,
  30. logging and tracing, different modes for interprocess communication and
  31. many more options.
  32. endef
  33. define Package/socat/config
  34. config SOCAT_SSL
  35. bool "SSL support"
  36. depends on PACKAGE_socat
  37. default n
  38. help
  39. Implements SSL support in socat (using libopenssl).
  40. endef
  41. define Package/socat/conffiles
  42. /etc/config/socat
  43. endef
  44. CONFIGURE_ARGS += \
  45. --disable-libwrap \
  46. --disable-readline \
  47. --enable-termios
  48. ifneq ($(CONFIG_SOCAT_SSL),y)
  49. CONFIGURE_ARGS+= --disable-openssl
  50. endif
  51. # PowerPC has different TERMIOS bits
  52. ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
  53. CONFIGURE_VARS += \
  54. sc_cv_sys_crdly_shift=12 \
  55. sc_cv_sys_tabdly_shift=10 \
  56. sc_cv_sys_csize_shift=8
  57. else
  58. CONFIGURE_VARS += \
  59. sc_cv_sys_crdly_shift=9 \
  60. sc_cv_sys_tabdly_shift=11 \
  61. sc_cv_sys_csize_shift=4
  62. endif
  63. CONFIGURE_VARS += \
  64. sc_cv_termios_ispeed="no" \
  65. ac_cv_header_bsd_libutil_h=no \
  66. ac_cv_lib_bsd_openpty=no \
  67. BUILD_DATE=$(SOURCE_DATE_EPOCH)
  68. define Package/socat/install
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
  71. $(INSTALL_DIR) $(1)/etc/config
  72. $(INSTALL_CONF) ./files/socat.config $(1)/etc/config/socat
  73. $(INSTALL_DIR) $(1)/etc/init.d
  74. $(INSTALL_BIN) ./files/socat.init $(1)/etc/init.d/socat
  75. endef
  76. $(eval $(call BuildPackage,socat))