1 Summary: Single threaded NSCD implementation
6 Group: Networking/Daemons
7 Source0: http://busybox.net/~vda/unscd/nscd-%{version}.c
8 # Source0-md5: d0e2ea863aa4f6724901c8fec24022b9
10 Source2: nscd.sysconfig
11 Source3: nscd.logrotate
14 Requires(post): fileutils
15 Requires(post,preun): /sbin/chkconfig
16 Requires(postun): /usr/sbin/groupdel
17 Requires(postun): /usr/sbin/userdel
18 Requires(pre): /bin/id
19 Requires(pre): /usr/bin/getgid
20 Requires(pre): /usr/sbin/groupadd
21 Requires(pre): /usr/sbin/useradd
22 Requires: rc-scripts >= 0.2.0
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Single threaded NSCD (Name Service Caching Daemon) implementation.
30 nscd caches name service lookups; it can dramatically improve
31 performance with NIS+, and may help with DNS as well.
35 sed -ne '/Description:/,/\*\*\*/p' %{SOURCE0} > README
38 %{__cc} -o nscd %{rpmcflags} -Os %{rpmcppflags} %{rpmldflags} -Wall -Wunused-parameter -Wl,--sort-section -Wl,alignment -Wl,--sort-common %{SOURCE0}
41 rm -rf $RPM_BUILD_ROOT
42 install -d $RPM_BUILD_ROOT{%{_sbindir},/var/log,/var/run/nscd,/etc/{logrotate.d,rc.d/init.d,sysconfig}}
43 install -p nscd $RPM_BUILD_ROOT%{_sbindir}
44 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
45 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/nscd
46 cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
47 cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
48 : > $RPM_BUILD_ROOT/var/log/nscd
51 rm -rf $RPM_BUILD_ROOT
54 %groupadd -P nscd -g 144 -r nscd
55 %useradd -P nscd -u 144 -r -d /tmp -s /bin/false -c "Name Service Cache Daemon" -g nscd nscd
58 if [ ! -f /var/log/nscd ]; then
61 chown root:root /var/log/nscd
62 chmod 640 /var/log/nscd
64 /sbin/chkconfig --add nscd
65 %service nscd restart "Name Service Cache Daemon"
68 if [ "$1" = "0" ]; then
70 /sbin/chkconfig --del nscd
74 if [ "$1" = "0" ]; then
80 %defattr(644,root,root,755)
82 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nscd
83 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nscd.conf
84 %attr(754,root,root) /etc/rc.d/init.d/nscd
85 %attr(755,root,root) %{_sbindir}/nscd
86 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/nscd
87 %attr(640,root,root) %ghost /var/log/nscd