aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/socat/Makefile73
-rw-r--r--net/socat/patches/010-fix_cross_compiling_error.patch22
2 files changed, 95 insertions, 0 deletions
diff --git a/net/socat/Makefile b/net/socat/Makefile
new file mode 100644
index 000000000..a0d1e51a6
--- /dev/null
+++ b/net/socat/Makefile
@@ -0,0 +1,73 @@
+#
+# Copyright (C) 2006-2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=socat
+PKG_VERSION:=1.7.2.4
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
+PKG_MD5SUM:=69b8155dd442a6f24e28ef5407d868eb
+
+PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net>
+
+PKG_LICENSE:=GPL-2.0 OpenSSL
+PKG_LICENSE_FILE:=COPYING COPYING.OpenSSL
+
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/socat
+ SECTION:=net
+ CATEGORY:=Network
+ DEPENDS:=+libpthread +SOCAT_SSL:libopenssl
+ TITLE:=A multipurpose relay (SOcket CAT)
+ URL:=http://www.dest-unreach.org/socat/
+endef
+
+define Package/socat/description
+ SoCat (for SOcket CAT) establishes two bidirectional byte streams and
+ transfers data between them.
+ Data channels may be files, pipes, devices (terminal or modem, etc.), or
+ sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking,
+ logging and tracing, different modes for interprocess communication and
+ many more options.
+endef
+
+define Package/socat/config
+config SOCAT_SSL
+ bool "SSL support"
+ depends on PACKAGE_socat
+ default n
+ help
+ Implements SSL support in socat (using libopenssl).
+endef
+
+CONFIGURE_ARGS += \
+ --disable-libwrap \
+ --disable-readline \
+ --enable-termios
+
+ifneq ($(CONFIG_SOCAT_SSL),y)
+ CONFIGURE_ARGS+= --disable-openssl
+endif
+
+CONFIGURE_VARS += \
+ sc_cv_termios_ispeed="no" \
+ sc_cv_sys_crdly_shift=9 \
+ sc_cv_sys_tabdly_shift=11 \
+ sc_cv_sys_csize_shift=4
+
+define Package/socat/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,socat))
diff --git a/net/socat/patches/010-fix_cross_compiling_error.patch b/net/socat/patches/010-fix_cross_compiling_error.patch
new file mode 100644
index 000000000..059938b56
--- /dev/null
+++ b/net/socat/patches/010-fix_cross_compiling_error.patch
@@ -0,0 +1,22 @@
+--- a/configure.in
++++ b/configure.in
+@@ -41,7 +41,7 @@ AC_CHECK_PROG(AR, ar, ar, gar)
+ # fail
+ AC_LANG_COMPILER_REQUIRE()
+
+-if test "$CC" = "gcc"; then
++if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
+ ERRONWARN="-Werror -O0"
+ elif test "$CC" = "clang"; then
+--- a/configure
++++ b/configure
+@@ -3348,7 +3348,7 @@ fi
+
+
+
+-if test "$CC" = "gcc"; then
++if test "$GCC" = yes; then
+ CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
+ ERRONWARN="-Werror -O0"
+ elif test "$CC" = "clang"; then