]> 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 be3a05ba41ba80982ef5803f585ae29fd48197cf..410da9b5e5e525f148fc1125119d5d94f5c35f3a 100644 (file)
@@ -1,11 +1,11 @@
 Summary:       Single threaded NSCD (Name Service Caching Daemon)
 Name:          unscd
-Version:       0.48
-Release:       4
+Version:       0.49
+Release:       1
 License:       GPL v2
 Group:         Networking/Daemons
 Source0:       http://busybox.net/~vda/unscd/nscd-%{version}.c
-# Source0-md5: fc4d22da86fd82f3f17e570222a8cd5b
+# Source0-md5: ee9cdaac340635e0c14551febbc0fd22
 Source1:       nscd.init
 Source2:       nscd.sysconfig
 Source3:       nscd.logrotate
@@ -14,6 +14,7 @@ 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
@@ -23,11 +24,15 @@ 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
 A daemon which handles passwd, group and host lookups for running
 programs and caches the results for the next query. You only need this
@@ -44,21 +49,23 @@ 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},%{_mandir}/man8,/var/log,/var/run/nscd,/etc/{logrotate.d,rc.d/init.d,sysconfig},/usr/lib/tmpfiles.d}
-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 -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/usr/lib/tmpfiles.d/nscd.conf
+cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
 : > $RPM_BUILD_ROOT/var/log/nscd
 
 %clean
@@ -100,5 +107,5 @@ fi
 %{_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
-/usr/lib/tmpfiles.d/nscd.conf
+%{systemdtmpfilesdir}/nscd.conf
 %dir /var/run/nscd
This page took 0.100521 seconds and 4 git commands to generate.