Browse Source

socat: Import from oldpackages, upgrade to 1.7.2.4, update copyright, license info, pkg maintainer. Fix cross built error

Signed-off-by: Ted Hess <thess@kitschensync.net>
Ted Hess 10 years ago
parent
commit
887411b8c3
2 changed files with 95 additions and 0 deletions
  1. 73
    0
      net/socat/Makefile
  2. 22
    0
      net/socat/patches/010-fix_cross_compiling_error.patch

+ 73
- 0
net/socat/Makefile View File

@@ -0,0 +1,73 @@
1
+#
2
+# Copyright (C) 2006-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=socat
11
+PKG_VERSION:=1.7.2.4
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15
+PKG_SOURCE_URL:=http://www.dest-unreach.org/socat/download
16
+PKG_MD5SUM:=69b8155dd442a6f24e28ef5407d868eb
17
+
18
+PKG_MAINTAINER:= Ted Hess <thess@kitschensync.net>
19
+
20
+PKG_LICENSE:=GPL-2.0 OpenSSL
21
+PKG_LICENSE_FILE:=COPYING COPYING.OpenSSL
22
+
23
+PKG_INSTALL:=1
24
+
25
+include $(INCLUDE_DIR)/package.mk
26
+
27
+define Package/socat
28
+  SECTION:=net
29
+  CATEGORY:=Network
30
+  DEPENDS:=+libpthread +SOCAT_SSL:libopenssl
31
+  TITLE:=A multipurpose relay (SOcket CAT)
32
+  URL:=http://www.dest-unreach.org/socat/
33
+endef
34
+
35
+define Package/socat/description
36
+	SoCat (for SOcket CAT) establishes two bidirectional byte streams and
37
+	transfers data between them.
38
+	Data channels may be files, pipes, devices (terminal or modem, etc.), or
39
+	sockets (Unix, IPv4, IPv6, raw, UDP, TCP, SSL). It provides forking,
40
+	logging and tracing, different modes for interprocess communication and
41
+	many more options.
42
+endef
43
+
44
+define Package/socat/config
45
+config SOCAT_SSL
46
+        bool "SSL support"
47
+        depends on PACKAGE_socat
48
+        default n
49
+        help
50
+          Implements SSL support in socat (using libopenssl).
51
+endef
52
+
53
+CONFIGURE_ARGS += \
54
+	--disable-libwrap \
55
+	--disable-readline \
56
+	--enable-termios
57
+
58
+ifneq ($(CONFIG_SOCAT_SSL),y)
59
+  CONFIGURE_ARGS+= --disable-openssl
60
+endif
61
+
62
+CONFIGURE_VARS += \
63
+	sc_cv_termios_ispeed="no" \
64
+	sc_cv_sys_crdly_shift=9 \
65
+	sc_cv_sys_tabdly_shift=11 \
66
+	sc_cv_sys_csize_shift=4
67
+
68
+define Package/socat/install
69
+	$(INSTALL_DIR) $(1)/usr/bin
70
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/socat $(1)/usr/bin/
71
+endef
72
+
73
+$(eval $(call BuildPackage,socat))

+ 22
- 0
net/socat/patches/010-fix_cross_compiling_error.patch View File

@@ -0,0 +1,22 @@
1
+--- a/configure.in
2
++++ b/configure.in
3
+@@ -41,7 +41,7 @@ AC_CHECK_PROG(AR, ar, ar, gar)
4
+ # fail
5
+ AC_LANG_COMPILER_REQUIRE()
6
+ 
7
+-if test "$CC" = "gcc"; then
8
++if test "$GCC" = yes; then
9
+    CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
10
+    ERRONWARN="-Werror -O0"
11
+ elif test "$CC" = "clang"; then
12
+--- a/configure
13
++++ b/configure
14
+@@ -3348,7 +3348,7 @@ fi
15
+ 
16
+ 
17
+ 
18
+-if test "$CC" = "gcc"; then
19
++if test "$GCC" = yes; then
20
+    CFLAGS="$CFLAGS -D_GNU_SOURCE -Wall -Wno-parentheses"
21
+    ERRONWARN="-Werror -O0"
22
+ elif test "$CC" = "clang"; then