]> git.pld-linux.org Git - packages/unscd.git/blobdiff - unscd.spec
allow debug build (via rpmbuild -debug), defaults off now
[packages/unscd.git] / unscd.spec
index d1f3378d9c60086426e1491856fbf259ab2bbc72..410da9b5e5e525f148fc1125119d5d94f5c35f3a 100644 (file)
@@ -1,16 +1,20 @@
-Summary:       Single threaded NSCD implementation
+Summary:       Single threaded NSCD (Name Service Caching Daemon)
 Name:          unscd
-Version:       0.48
+Version:       0.49
 Release:       1
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       http://busybox.net/~vda/unscd/nscd-%{version}.c
-# Source0-md5: d0e2ea863aa4f6724901c8fec24022b9
+# Source0-md5: ee9cdaac340635e0c14551febbc0fd22
 Source1:       nscd.init
 Source2:       nscd.sysconfig
 Source3:       nscd.logrotate
 Source4:       nscd.conf
+Source5:       http://svn.donarmstrong.com/deb_pkgs/unscd/trunk/debian/nscd.8
+# Source5-md5: eac364084cae21114174404790dfc0df
+Source6:       nscd.tmpfiles
 URL:           http://busybox.net/~vda/unscd/
+BuildRequires: rpmbuild(macros) >= 1.644
 Provides:      group(nscd)
 Requires(post):        fileutils
 Requires(post,preun):  /sbin/chkconfig
@@ -20,32 +24,48 @@ Requires(pre):      /bin/id
 Requires(pre): /usr/bin/getgid
 Requires(pre): /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
-Requires:      rc-scripts >= 0.2.0
+Requires:      rc-scripts >= 0.4.1.26
 Provides:      user(nscd)
+Obsoletes:     gnscd
 Obsoletes:     nscd
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# glibc private symbols
+%define                _noautoreq              libc.so.6(GLIBC_PRIVATE)
+
 %description
-Single threaded NSCD (Name Service Caching Daemon) implementation.
+A daemon which handles passwd, group and host lookups for running
+programs and caches the results for the next query. You only need this
+package if you are using slow Name Services like LDAP, NIS or NIS+.
+
+This particular NSCD is a complete rewrite of the GNU glibc nscd which
+is a single threaded server process which offloads all NSS lookups to
+worker children; cache hits are handled by the parent, and only cache
+misses start worker children, making the parent immune to resource
+leaks, hangs, and crashes in NSS libraries.
 
-nscd caches name service lookups; it can dramatically improve
-performance with NIS+, and may help with DNS as well.
+It should mostly be a drop-in replacement for existing installs using
+nscd.
 
 %prep
 %setup -qcT
-sed -ne '/Description:/,/\*\*\*/p' %{SOURCE0} > README
+%{__sed} -ne '/Description:/,/\*\*\*/p' %{SOURCE0} > README
+
+%{__sed} -e '/#define DEBUG_BUILD/ s,^,// ,' %{SOURCE0} > %{name}.c
 
 %build
-%{__cc} -o nscd %{rpmcflags} -Os %{rpmcppflags} %{rpmldflags} -Wall -Wunused-parameter -Wl,--sort-section -Wl,alignment -Wl,--sort-common %{SOURCE0}
+%{__cc} -o %{name} %{rpmcflags} %{!?debug:-Os} %{rpmcppflags} -DDEBUG_BUILD=0%{?debug:1} %{rpmldflags} -Wall -Wunused-parameter -Wl,--sort-section -Wl,alignment -Wl,--sort-common %{name}.c
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},/var/log,/var/run/nscd,/etc/{logrotate.d,rc.d/init.d,sysconfig}}
-install -p nscd $RPM_BUILD_ROOT%{_sbindir}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,/var/log,/var/run/nscd,/etc/{logrotate.d,rc.d/init.d,sysconfig},%{systemdtmpfilesdir}}
+install -p %{name} $RPM_BUILD_ROOT%{_sbindir}/nscd
 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
-cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/nscd
-cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
-cp -a %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man8
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/nscd
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
+cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
 : > $RPM_BUILD_ROOT/var/log/nscd
 
 %clean
@@ -84,6 +104,8 @@ fi
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nscd.conf
 %attr(754,root,root) /etc/rc.d/init.d/nscd
 %attr(755,root,root) %{_sbindir}/nscd
+%{_mandir}/man8/nscd.8*
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/nscd
 %attr(640,root,root) %ghost /var/log/nscd
+%{systemdtmpfilesdir}/nscd.conf
 %dir /var/run/nscd
This page took 0.091889 seconds and 4 git commands to generate.