File ucspi-tcp.spec of Package ucspi-tcp

#
# spec file for package ucspi-tcp
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2008-2009 Exata T.I., Maringa, PR, Brasil,
#               2008-2009, Weberhofer GmbH, Austria.
#
# 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 http://bugs.opensuse.org/
#


Name:           ucspi-tcp
Version:        0.88
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       daemontools >= 0.76
Obsoletes:      %{name}-toaster < %{version}
Provides:       %{name}-toaster = %{version}
Obsoletes:      %{name}-toaster-doc < %{version}
Provides:       %{name}-toaster-doc = %{version}
Summary:        Tcpserver and tcpclient for building TCP client-server apps
License:        SUSE-Public-Domain
Group:          Productivity/Networking/System
Url:            http://cr.yp.to/ucspi-tcp.html
Source:         %{name}-%{version}.tar.bz2
Source1:        %{name}-%{version}-man.tar.bz2
Patch0:         %{name}-%{version}.errno.patch
Patch1:         %{name}-%{version}.a+_record.patch
Patch2:         %{name}-%{version}.limits.patch
Patch3:         %{name}-%{version}.rbltimeout.patch
Patch4:         %{name}-%{version}.nodefaultrbl.patch
Patch5:         fix_includes_prototypes.patch
Patch6:         %{name}-no-return.patch

%description
Tcpserver and tcpclient are easy-to-use command-line tools for building TCP
client-server applications.

Tcpserver waits for incoming connections  and, for each  connection, runs a
program  of  your  choice.  Your  program  receives  environment  variables
showing the local and remote host names, IP addresses, and port numbers.

Tcpserver offers a concurrency  limit to  protect  you from  running out of
processes and memory.   When you  are handling 40 (by default) simultaneous
connections, tcpserver smoothly defers acceptance of new connections.

Tcpserver   also   provides   TCP  access  control   features,  similar  to
tcp-wrappers/tcpd's hosts.allow but much faster.  It's access control rules
are compiled into a  hashed format  with cdb,  so it  can easily  deal with
thousands of different hosts.

This package  includes  a  recordio  tool  that  monitors all the input and
output of a server.

Tcpclient makes a TCP connection and runs a program of your choice. It sets
up the same environment variables as tcpserver.

This package includes several sample clients built on top of tcpclient:
who@, date@, finger@, http@, tcpcat, and mconnect.

Tcpserver  and tcpclient  conform to  UCSPI, the UNIX Client-Server Program
Interface, using the TCP protocol.  UCSPI  tools are  available for several
different networks.

#----------------------------------------------------------------------------------

Patches Included:

ucspi-tcp-0.88.errno.patch from Mate Wierdl
(http://djbware.csi.hu/patches/ucspi-tcp-0.88.errno.patch)

ucspi-tcp-0.88.a+_record.patch from Mate Wierdl (with improvements
to increases rblsmtpd text length from 200 to 500 characters)
(http://djbware.csi.hu/patches/ucspi-tcp-0.88.a_record.patch)

ucspi-tcp-0.88.limits.patch from http://linux.voyager.hr/ucspi-tcp
(http://linux.voyager.hr/ucspi-tcp/files/tcpserver-limits-2006-01-26.diff)

ucspi-tcp-0.88.rbltimeout.patch patch based upon Nikola Vladov's
 ucspi-tcp-0.88.rbltimeout.patch
(http://riemann.fmi.uni-sofia.bg/programs/rblsmtpd-timeout.tar.gz)

ucspi-tcp-0.88.nodefaultrbl.patch from Charles Cazabon
(http://pyropus.ca/software/misc/rblsmtpd-nodefaultrbl.patch)


%prep
%setup -q -a 1
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%patch6

%build
echo 'cc %{optflags}' > conf-cc
echo 'cc -s %{optflags}' > conf-ld
echo %{_prefix} > conf-home
%{__make} prog
echo %{buildroot}%{_prefix} > conf-home
%{__make} install instcheck

%install
%if 0%{?rhel_version} == 505 || 0%{?centos_version} == 505
%{__mkdir_p} %{buildroot}
%endif
./install
./instcheck
%{__install} -d %{buildroot}%{_mandir}/{man5,man8}
%{__install} -m 644 ucspi-tcp-%{version}-man/*.5 %{buildroot}%{_mandir}/man5
%{__install} -m 644 ucspi-tcp-%{version}-man/*.8 %{buildroot}%{_mandir}/man8

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(0755,root,root)
%{_bindir}/addcr
%{_bindir}/argv0
%{_bindir}/date@
%{_bindir}/delcr
%{_bindir}/finger@
%{_bindir}/fixcrio
%{_bindir}/http@
%{_bindir}/mconnect
%{_bindir}/mconnect-io
%{_bindir}/rblsmtpd
%{_bindir}/recordio
%{_bindir}/tcpcat
%{_bindir}/tcpclient
%{_bindir}/tcprules
%{_bindir}/tcprulescheck
%{_bindir}/tcpserver
%{_bindir}/who@

%defattr(0644,root,root,0755)
%doc CHANGES README TODO VERSION
%{_mandir}/man5/*.5*
%{_mandir}/man8/*.8*

%changelog
openSUSE Build Service is sponsored by