Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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.1
  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_MD5SUM:=d2da659540c38139f388e9437bfaae16bb458d174d056cb3228432a8f489fbaa
  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. TARGET_CFLAGS += \
  67. -include stddef.h
  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))