2007-01-16 00:37:38 +01:00
|
|
|
#
|
2011-12-07 22:34:17 +01:00
|
|
|
# spec file for package socat
|
2007-01-16 00:37:38 +01:00
|
|
|
#
|
2018-02-05 09:25:20 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-10-28 13:29:18 +02:00
|
|
|
# Copyright (c) 2010 Pascal Bleser <pascal.bleser@opensuse.org>
|
2007-01-16 00:37:38 +01:00
|
|
|
#
|
2008-10-22 18:50:18 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:37:38 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-05-25 16:18:31 +02:00
|
|
|
|
2007-01-16 00:37:38 +01:00
|
|
|
Name: socat
|
2011-12-22 13:10:25 +01:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: procps
|
|
|
|
BuildRequires: readline-devel
|
2015-04-14 21:19:27 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-12-22 13:10:25 +01:00
|
|
|
BuildRequires: tcpd-devel
|
2015-04-14 21:19:27 +02:00
|
|
|
%endif
|
2015-04-21 07:39:05 +02:00
|
|
|
# begin: test deps: (ip, ping, ping6, netstat, /etc/services)
|
2016-02-02 13:52:42 +01:00
|
|
|
%if 0%{?suse_version}
|
2015-04-21 07:39:05 +02:00
|
|
|
BuildRequires: iproute2
|
|
|
|
BuildRequires: netcfg
|
2016-02-02 13:52:42 +01:00
|
|
|
%endif
|
|
|
|
BuildRequires: iputils
|
2015-04-21 07:39:05 +02:00
|
|
|
BuildRequires: net-tools
|
2016-02-02 13:52:42 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
2015-04-21 07:39:05 +02:00
|
|
|
BuildRequires: net-tools-deprecated
|
|
|
|
%endif
|
|
|
|
# end: test deps
|
2017-04-12 15:52:15 +02:00
|
|
|
Version: 1.7.3.2
|
2011-12-22 13:10:25 +01:00
|
|
|
Release: 0
|
2008-02-15 01:41:08 +01:00
|
|
|
Url: http://www.dest-unreach.org/socat/
|
2007-01-16 00:37:38 +01:00
|
|
|
Summary: Multipurpose relay for bidirectional data transfer
|
2018-04-03 22:37:04 +02:00
|
|
|
License: SUSE-GPL-2.0-with-openssl-exception AND MIT
|
2011-12-22 13:10:25 +01:00
|
|
|
Group: Productivity/Networking/Other
|
2007-01-16 00:37:38 +01:00
|
|
|
Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.bz2
|
2017-08-17 17:39:34 +02:00
|
|
|
Patch0: socat-openssl-1.1-tests.patch
|
2018-02-05 09:25:20 +01:00
|
|
|
Patch1: socat-ignore-tests-failure-boo1078346.patch
|
2015-04-14 21:19:27 +02:00
|
|
|
Source1: %{name}.changes
|
2007-01-16 00:37:38 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
socat is a relay for bidirectional data transfer between two
|
|
|
|
independent data channels. Each of these data channels may be a file,
|
|
|
|
pipe, device (serial line etc. or a pseudo terminal), a socket (UNIX,
|
|
|
|
IP4, IP6 - raw, UDP, TCP), an SSL socket, proxy CONNECT connection, a
|
|
|
|
file descriptor (stdin etc.), the GNU line editor, a program, or a
|
|
|
|
combination of two of these.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup
|
2017-08-17 17:39:34 +02:00
|
|
|
if pkg-config --atleast-version=1.1 openssl
|
|
|
|
then
|
|
|
|
%patch0 -p1
|
|
|
|
fi
|
2018-02-05 09:25:20 +01:00
|
|
|
%patch1 -p1
|
2007-01-16 00:37:38 +01:00
|
|
|
|
|
|
|
%build
|
2015-04-14 21:19:27 +02:00
|
|
|
# export deterministic BUILD_DATE, format like "__DATE__ __TIME__"
|
|
|
|
CL_DATE="$(awk -F " - " 'NR==2{print $1;}' %{SOURCE1})"
|
|
|
|
test -n "$CL_DATE"
|
|
|
|
export BUILD_DATE="$(LANG=C date --utc -d "${CL_DATE}" +"%b %e %Y %T")"
|
2011-12-07 22:34:17 +01:00
|
|
|
export RPM_OPT_FLAGS="%{optflags} -fno-strict-aliasing"
|
|
|
|
%configure
|
2007-01-16 00:37:38 +01:00
|
|
|
%{__make} all
|
|
|
|
mkdir examples
|
2015-04-21 07:39:05 +02:00
|
|
|
cp -a daemon.sh ftp.sh mail.sh proxyecho.sh readline.sh examples
|
2007-01-16 00:37:38 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p \
|
|
|
|
${RPM_BUILD_ROOT}/%{_bindir} \
|
|
|
|
${RPM_BUILD_ROOT}/%{_mandir}/man1
|
|
|
|
%{__make} DESTDIR=${RPM_BUILD_ROOT} install
|
|
|
|
|
2015-04-14 21:19:27 +02:00
|
|
|
%check
|
|
|
|
export TERM=ansi
|
2015-04-21 07:39:05 +02:00
|
|
|
# use a small but safe subset of all tests
|
|
|
|
sotests="filan consistency stdio fd pipe pipes exec gopen noatime system"
|
|
|
|
%ifnarch armv6l armv6hl aarch64
|
|
|
|
# add some more tests for fast machines only
|
|
|
|
sotests+=" unix"
|
|
|
|
%endif
|
|
|
|
# increase socket shutdown timeout, default 0.1 or 0.5 caused sometimes
|
|
|
|
# random failures on slow machines (armv6l, aarch64)
|
|
|
|
export OPTS="-t 2"
|
|
|
|
./test.sh $sotests
|
2015-04-14 21:19:27 +02:00
|
|
|
|
2007-01-16 00:37:38 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2018-04-03 22:37:04 +02:00
|
|
|
%license COPYING COPYING.OpenSSL
|
|
|
|
%doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY VERSION examples
|
2007-01-16 00:37:38 +01:00
|
|
|
%{_bindir}/socat
|
|
|
|
%{_bindir}/procan
|
|
|
|
%{_bindir}/filan
|
2014-02-02 11:14:32 +01:00
|
|
|
%{_mandir}/man1/socat.1*
|
2011-12-07 22:34:17 +01:00
|
|
|
|
2010-10-28 13:29:26 +02:00
|
|
|
%changelog
|