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