File linux_pcnfsd2.spec of Package linux_pcnfsd2

#
# spec file for package linux_pcnfsd2
#
# Copyright (c) 2017 SUSE LINUX 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/
#


#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
  %define _fillupdir /var/adm/fillup-templates
%endif

Name:           linux_pcnfsd2
#!BuildIgnore: nkitb
PreReq:         %insserv_prereq %fillup_prereq
Requires:       net-tools
Requires:       netcfg
Version:        1.6
Release:        0
Summary:        RPC Server That Supports ONC Clients
License:        Zlib
Group:          Productivity/Networking/NFS
Source:         linux_pcnfsd2.tar.gz
Source1:        pcnfsd
Source2:        sysconfig.pcnfsd
Patch:          linux_pcnfsd2.dif
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
RPC server that supports ONC clients on PC (DOS, OS/2, Macintosh, and
other) systems.



Authors:
--------
    Alexander Bezprozvanny <bez@parsy.spb.su>

%prep
%setup -n %{name}
%patch

%build
make -f Makefile.linux 

%install
install -d -m 755 $RPM_BUILD_ROOT{/usr/sbin,%{_mandir}/man8}
install linux/clnt.pcnfsd linux/rpc.pcnfsd $RPM_BUILD_ROOT/usr/sbin
install -m 644 pcnfsd.8c $RPM_BUILD_ROOT/%{_mandir}/man8
ln -sf pcnfsd.8c.gz $RPM_BUILD_ROOT/%{_mandir}/man8/rpc.pcnfsd.8c.gz
install -d $RPM_BUILD_ROOT%{_fillupdir}
install -m 644 %{S:2} $RPM_BUILD_ROOT%{_fillupdir}/
install -d $RPM_BUILD_ROOT/etc/init.d
install -m 744 %{S:1} $RPM_BUILD_ROOT/etc/init.d/
ln -sf ../../etc/init.d/pcnfsd $RPM_BUILD_ROOT/usr/sbin/rcpcnfsd

%post
%{fillup_and_insserv pcnfsd}

%preun
%stop_on_removal pcnfsd}

%postun
%restart_on_update pcnfsd
%{insserv_cleanup}

%clean
[ -d %{buildroot} -a "%{buildroot}" != "" ] && rm -rf  %{buildroot}

%files
%defattr(-,root,root)
%doc README
%doc %{_mandir}/man8/*
/usr/sbin/*
%config /etc/init.d/*
%{_fillupdir}/sysconfig.pcnfsd

%changelog
openSUSE Build Service is sponsored by