BuildRequires: automake
BuildRequires: bison
BuildRequires: flex
-BuildRequires: libtool
BuildRequires: idnkit-devel
+BuildRequires: libtool
%{?with_ldap:BuildRequires: openldap-devel}
%{?with_ssl:BuildRequires: openssl-devel >= 0.9.7d}
-BuildRequires: rpmbuild(macros) >= 1.202
-PreReq: %{name}-libs = %{epoch}:%{version}-%{release}
-PreReq: rc-scripts >= 0.2.0
-Requires(pre): fileutils
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun): /sbin/chkconfig
+Requires(postun): /usr/sbin/groupdel
+Requires(postun): /usr/sbin/userdel
Requires(pre): /bin/id
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires(postun): /usr/sbin/groupdel
-Requires(postun): /usr/sbin/userdel
-Requires(post,preun): /sbin/chkconfig
+Requires(pre): fileutils
+Requires: %{name}-libs = %{epoch}:%{version}-%{release}
Requires: psmisc >= 20.1
+Requires: rc-scripts >= 0.2.0
Provides: group(named)
Provides: nameserver
Provides: user(named)
touch $RPM_BUILD_ROOT%{_var}/lib/named/{named.{log,stats},dev/{random,null}}
-%{?with_ldap:mkdir -p $RPM_BUILD_ROOT%{_datadir}/openldap/schema/}
+%{?with_ldap:install -d $RPM_BUILD_ROOT%{_datadir}/openldap/schema}
%{?with_ldap:install %{SOURCE6} $RPM_BUILD_ROOT%{_datadir}/openldap/schema/dnszone.schema}
# we don't want Makefiles in documentation...
+# FIXME: breaks re-entrant install
rm -f doc/misc/Makefile*
%clean
%post
/sbin/chkconfig --add named
-if [ -f /var/lock/subsys/named ]; then
- /etc/rc.d/init.d/named restart 1>&2
-else
- echo "Type \"/etc/rc.d/init.d/named start\" to start named." 1>&2
-fi
+%service named restart
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/named ]; then
- /etc/rc.d/init.d/named stop 1>&2
- fi
+ %service named stop
/sbin/chkconfig --del named
fi