File yp-tools.spec of Package yp-tools
#
# spec file for package yp-tools
#
# 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: yp-tools
Version: 2.14
Release: 0
Summary: Network Information Service (YP) client utilities
License: GPL-2.0
Group: Productivity/Networking/NIS
Source: http://www.linux-nis.org/download/yp-tools/yp-tools-%{version}.tar.bz2
Url: http://www.linux-nis.org/
Source1: match_printcap
Patch0: yp-tools-workaround-SunOS-bug.diff
Patch1: yp-tools-wrong-deprecated-msg.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
This packages contains some useful tools for accessing NIS maps or to
test NIS configurations.
%prep
%setup -q
%patch0 -p0
%patch1 -p0
%build
CFLAGS="%{optflags}" ./configure --enable-call-passwd --enable-domainname --mandir=%{_mandir}
make
%install
%make_install
# Not yet
rm -f %{buildroot}%{_sbindir}/ypserv_test
cp -a %{buildroot}%{_mandir}/man8/domainname.8 %{buildroot}%{_mandir}/man8/nisdomainname.8
cp -a %{buildroot}%{_mandir}/man8/domainname.8 %{buildroot}%{_mandir}/man8/ypdomainname.8
mkdir -p %{buildroot}%{_prefix}/lib/yp
install -m 755 %{SOURCE1} %{buildroot}%{_prefix}/lib/yp
rm %{buildroot}%{_bindir}/domainname %{buildroot}%{_mandir}/man8/domainname.8
#UsrMerge
mkdir -p %{buildroot}/bin
ln -sf %{_bindir}/nisdomainname %{buildroot}/bin
ln -sf %{_bindir}/ypdomainname %{buildroot}/bin
#EndUsrMerge
%{find_lang} %{name}
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING NEWS README THANKS TODO
%dir %{_localstatedir}/yp
%config(noreplace) %{_localstatedir}/yp/nicknames
#UsrMerge
/bin/nisdomainname
/bin/ypdomainname
#EndUsrMerge
%{_bindir}/nisdomainname
%{_bindir}/ypcat
%{_bindir}/ypchfn
%{_bindir}/ypchsh
%{_bindir}/ypdomainname
%{_bindir}/ypmatch
%{_bindir}/yppasswd
%{_bindir}/ypwhich
%dir %{_prefix}/lib/yp
%{_prefix}/lib/yp/match_printcap
%doc %{_mandir}/man1/ypcat.1.gz
%doc %{_mandir}/man1/ypchfn.1.gz
%doc %{_mandir}/man1/ypchsh.1.gz
%doc %{_mandir}/man1/ypmatch.1.gz
%doc %{_mandir}/man1/yppasswd.1.gz
%doc %{_mandir}/man1/ypwhich.1.gz
%doc %{_mandir}/man5/nicknames.5.gz
%doc %{_mandir}/man8/yppoll.8.gz
%doc %{_mandir}/man8/ypset.8.gz
%doc %{_mandir}/man8/yptest.8.gz
%doc %{_mandir}/man8/ypdomainname.8.gz
%doc %{_mandir}/man8/nisdomainname.8.gz
%{_sbindir}/yppoll
%{_sbindir}/ypset
%{_sbindir}/yptest
%changelog