File socat.spec of Package socat.36762
#
# spec file for package socat
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2010 Pascal Bleser <pascal.bleser@opensuse.org>
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: socat
BuildRequires: openssl-devel
BuildRequires: procps
BuildRequires: readline-devel
BuildRequires: tcpd-devel
Version: 1.7.2.4
Release: 0
URL: http://www.dest-unreach.org/socat/
Summary: Multipurpose relay for bidirectional data transfer
License: MIT AND SUSE-GPL-2.0-with-openssl-exception
Group: Productivity/Networking/Other
Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.bz2
Patch1: socat-remove_date.patch
Patch2: security-advisory-8-stack-overflow-in-parser.patch
Patch3: increase-dh-group-size-to-defend-against-logjam-1.patch
Patch4: increase-dh-group-size-to-defend-against-logjam-2.patch
Patch5: CVE-2024-54661.patch
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
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
export RPM_OPT_FLAGS="%{optflags} -fno-strict-aliasing"
%configure
%{__make} all
mkdir examples
mv daemon.sh ftp.sh mail.sh proxyecho.sh readline.sh examples
%install
mkdir -p \
${RPM_BUILD_ROOT}/%{_bindir} \
${RPM_BUILD_ROOT}/%{_mandir}/man1
%{__make} DESTDIR=${RPM_BUILD_ROOT} install
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc BUGREPORTS CHANGES COPYING COPYING.OpenSSL DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY VERSION examples
%{_bindir}/socat
%{_bindir}/procan
%{_bindir}/filan
%{_mandir}/man1/socat.1*
%changelog