File rinetd.spec of Package rinetd
#
# spec file for package rinetd (Version 0.62)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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/
#
# norootforbuild
Name: rinetd
License: GPL v2 or later
Group: Productivity/Networking/System
AutoReqProv: on
Version: 0.62
Release: 1
Summary: TCP Redirection Server
Url: http://www.boutell.com/rinetd/
Source0: rinetd-0.62.tar.bz2
Source1: rc.rinetd
Source2: logrotate.rinetd
Patch0: rinetd-doc.patch
Patch1: rinetd-syslog.patch
Patch2: rinetd-conf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq %insserv_prereq
%description
rinetd redirects TCP connections from one IP address and port to
another address and port. rinetd is a single-process server which
handles any number of connections to the address or port pairs
specified in the file /etc/rinetd.conf. Because rinetd runs as a single
process using nonblocking I/O, it is able to redirect a large number of
connections without a severe impact on the machine. This makes it
practical to run TCP services on machines inside an IP masquerading
firewall.
Note: rinetd can not redirect FTP because FTP requires more than one
socket.
Authors:
--------
Thomas Boutell <boutell@boutell.com>
%prep
%setup
%patch0
%patch1
%patch2
%build
make CFLAGS="$CFLAGS $RPM_OPT_FLAGS -DLINUX -fno-strict-aliasing"
%install
mkdir -p $RPM_BUILD_ROOT/%_mandir/man8
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
mkdir -p $RPM_BUILD_ROOT/usr/sbin
touch $RPM_BUILD_ROOT/etc/rinetd.conf
install -m 700 rinetd $RPM_BUILD_ROOT/usr/sbin
install -m 644 rinetd.8 $RPM_BUILD_ROOT%_mandir/man8
install -m 755 $RPM_SOURCE_DIR/rc.rinetd $RPM_BUILD_ROOT/etc/init.d/rinetd
install -m 644 %SOURCE2 $RPM_BUILD_ROOT/etc/logrotate.d/rinetd
ln -s ../../etc/init.d/rinetd $RPM_BUILD_ROOT/usr/sbin/rcrinetd
%post
%{fillup_and_insserv rinetd}
%postun
%{insserv_cleanup}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc CHANGES README index.html rinetd.conf.sample
%config(missingok,noreplace) %ghost /etc/rinetd.conf
%config(noreplace) /etc/logrotate.d/rinetd
%config /etc/init.d/rinetd
%_mandir/man8/rinetd.8.gz
/usr/sbin/rcrinetd
/usr/sbin/rinetd
%changelog