1 |
%define name ypserv |
2 |
%define version 2.27 |
3 |
%define release %mkrel 1 |
4 |
|
5 |
Summary: The NIS (Network Information Service) server |
6 |
Url: http://www.linux-nis.org/ |
7 |
Name: %{name} |
8 |
Version: %{version} |
9 |
Release: %{release} |
10 |
License: GPL |
11 |
Group: System/Servers |
12 |
|
13 |
Source0: http://www.linux-nis.org/download/ypserv/%{name}-%{version}.tar.bz2 |
14 |
Source1: ypserv-ypserv.init |
15 |
Source2: ypserv-yppasswdd.init |
16 |
Source3: ypserv-ypxfrd.init |
17 |
Patch0: ypserv-2.10-makefile.patch |
18 |
Patch2: ypserv-2.11-path.patch |
19 |
Patch6: ypserv-2.5-nfsnobody2.patch |
20 |
Patch11: ypserv-2.13-ypxfr-zeroresp.patch |
21 |
Patch16: ypserv-2.27-confpost.patch |
22 |
|
23 |
BuildRequires: mawk libgdbm-devel libopenslp-devel |
24 |
Requires: rpcbind mawk make |
25 |
Requires(post): rpm-helper |
26 |
Requires(preun): rpm-helper |
27 |
|
28 |
%description |
29 |
The Network Information Service (NIS) is a system which provides network |
30 |
information (login names, passwords, home directories, group information) |
31 |
to all of the machines on a network. NIS can enable users to login on |
32 |
any machine on the network, as long as the machine has the NIS client |
33 |
programs running and the user's password is recorded in the NIS passwd |
34 |
database. NIS was formerly known as Sun Yellow Pages (YP). |
35 |
|
36 |
This package provides the NIS server, which will need to be running on |
37 |
your network. NIS clients do not need to be running the server. |
38 |
|
39 |
Install ypserv if you need an NIS server for your network. You'll also |
40 |
need to install the yp-tools and ypbind packages onto any NIS client |
41 |
machines. |
42 |
|
43 |
%prep |
44 |
%setup -q |
45 |
%patch0 -p1 -b .makefix |
46 |
%patch2 -p0 -b .path |
47 |
%patch6 -p1 |
48 |
%patch11 -p1 |
49 |
%patch16 -p1 -b .confpost |
50 |
|
51 |
%build |
52 |
%serverbuild |
53 |
cp etc/README etc/README.etc |
54 |
%configure2_5x --enable-checkroot \ |
55 |
--enable-fqdn \ |
56 |
--libexecdir=%{_libdir}/yp \ |
57 |
--mandir=%{_mandir} |
58 |
%make |
59 |
|
60 |
%install |
61 |
%makeinstall libexecdir=%buildroot%{_libdir}/yp |
62 |
|
63 |
install -m644 etc/ypserv.conf -D %buildroot%{_sysconfdir}/ypserv.conf |
64 |
install -m755 %{SOURCE1} -D %buildroot%{_initrddir}/ypserv |
65 |
install -m755 %{SOURCE2} -D %buildroot%{_initrddir}/yppasswdd |
66 |
install -m755 %{SOURCE3} -D %buildroot%{_initrddir}/ypxfrd |
67 |
|
68 |
perl -pi -e "s|/etc/rc.d/init.d|%{_initrddir}|" %buildroot%{_initrddir}/* |
69 |
|
70 |
%post |
71 |
%_post_service ypserv |
72 |
%_post_service yppasswdd |
73 |
%_post_service ypxfrd |
74 |
|
75 |
%preun |
76 |
%_preun_service ypserv |
77 |
%_preun_service yppasswdd |
78 |
%_preun_service ypxfrd |
79 |
|
80 |
%files |
81 |
%doc README INSTALL ChangeLog TODO NEWS |
82 |
%doc etc/ypserv.conf etc/securenets etc/README.etc |
83 |
%config(noreplace) %{_sysconfdir}/ypserv.conf |
84 |
%config(noreplace) /var/yp/* |
85 |
%{_initrddir}/* |
86 |
%dir %{_libdir}/yp |
87 |
%attr(755, root, root) %{_libdir}/yp/* |
88 |
%attr(755, root, root) %{_sbindir}/* |
89 |
%{_mandir}/*/* |
90 |
%{_includedir}/*/* |