+# TODO:
+# - init script
Summary: This is the DENTS nameserver
Summary(pl): Serwer nazw DENTS
Name: dents
Release: 1
License: GPL
Group: Networking/Daemons
-Source0: http://ftp1.sourceforge.net/dents/%{name}-%{version}.tar.gz
+Source0: http://dl.sourceforge.net/dents/%{name}-%{version}.tar.gz
# Source0-md5: b7ffc0305143731b70934240acd426b6
URL: http://sourceforge.net/projects/dents/
BuildRequires: glib-devel
-Prereq: rc-scripts
-Prereq: /sbin/chkconfig
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun): /sbin/chkconfig
+Requires: rc-scripts
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
%post
/sbin/chkconfig --add dents
-if [ -f /var/lock/subsys/dents ]; then
- /etc/rc.d/init.d/dents restart 1>&2
-else
- echo "Run \"/etc/rc.d/init.d/dents start\" to start dents DNS server."
-fi
+%service dents restart
%preun
if [ "$1" = "0" ]; then
- if [ -f /var/lock/subsys/dents ]; then
- /etc/rc.d/init.d/dents stop 1>&2
- fi
+ %service dents stop
/sbin/chkconfig --del dents
fi