A new user interface for you!

File rsh.spec of Package rsh

# spec file for package rsh
# Copyright (c) 2014 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/

Name:           rsh
BuildRequires:  ncurses-devel
BuildRequires:  pam-devel
Requires:       netcfg
Provides:       nkitb:/usr/bin/rsh
Version:        0.17
Release:        0
Summary:        Clients for remote access commands (rsh, rlogin, and rcp)
License:        BSD-3-Clause
Group:          Productivity/Networking/Other
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Url:            ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
Source:         netkit-rsh-%{version}.tar.bz2
Source1:        rlogin.xinetd
Source2:        rsh.xinetd
Source3:        rexec.xinetd
Source4:        README.SUSE
Patch:          netkit-rsh-%{version}.diff
Patch1:         netkit-rsh-%{version}-pam.diff
Patch2:         netkit-rsh-%{version}-varargs.diff
Patch3:         netkit-rsh-%{version}-pam-env.diff
Patch4:         netkit-rsh-%{version}-revers.diff
Patch5:         netkit-rsh-%{version}-bigfile.diff
Patch6:         netkit-rsh-%{version}-null.diff
Patch7:         netkit-rsh-%{version}-rexec-netrc.diff
Patch8:         netkit-rsh-%{version}-checkdir.diff
Patch9:         netkit-rsh-%{version}-rexec-NPTL-signals.diff
Patch10:        netkit-rsh-%{version}-nostrip.diff
Patch11:        netkit-rsh-%{version}-realloc-assign.diff
Patch12:        netkit-rsh-%{version}-no_chown.diff
Patch13:        netkit-rsh-0.17-glibc28.patch
Patch14:        netkit-rsh-0.17-tty-4-pam.diff
Patch15:        netkit-rsh-0.17-pam-sess.patch
Patch16:        netkit-rsh-0.17-fork_before_exec.patch
Patch17:        rlogin-handle-EIO-better.patch

This package contains programs that allow users to run commands on
remote machines, to log in to other machines, and to copy files between
machines (rsh, rexec, rlogin, and rcp).  These commands use rhosts
style authentication.

For secure communication, openssh (SSH) should be used.

%package server
Version:        0.17
Release:        0
Summary:        Servers for Remote Access Commands (rsh, rlogin, rcp)
Group:          Productivity/Networking/Other
Requires:       netcfg
Requires:       tcpd
Provides:       nkitserv:/usr/sbin/in.rshd

%description server
This package contains a set of server programs which allow users to run
commands on remote machines, log in to other machines, and copy files
between machines (rsh, rexec, rlogin, and rcp). All of these services
are run by inetd and configured using /etc/inetd.conf. PAM will be used
for authentication. SSH should be used for secure communication.

%setup -q -n netkit-rsh-%{version}
cp %SOURCE4 .
%patch3 -p1
%patch10 -p1
%patch11 -p1
%patch17 -p1

echo "LDFLAGS += -pie" >> MCONFIG
make %{?jobs:-j%jobs}

install -d -m 755 $RPM_BUILD_ROOT/etc/pam.d
install -d -m 755 $RPM_BUILD_ROOT/usr/{bin,sbin}
install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man{1,5,8}
install -d -m 755 $RPM_BUILD_ROOT/etc/xinetd.d
install -m 644 %{S:1} $RPM_BUILD_ROOT/etc/xinetd.d/rlogin
install -m 644 %{S:2} $RPM_BUILD_ROOT/etc/xinetd.d/rsh
install -m 644 %{S:3} $RPM_BUILD_ROOT/etc/xinetd.d/rexec

rm -rf  %{buildroot}

%doc BUGS ChangeLog

%files server
%config /etc/pam.d/*
%config(noreplace) /etc/xinetd.d/*