]> git.pld-linux.org Git - packages/dents.git/blobdiff - dents.spec
- BR: rpmbuild macros for %service
[packages/dents.git] / dents.spec
index ad0460ba9fc9c6e8a739a2ebcf3fefe440e8962e..85b4cc99f92ac9a11ff2736dee0a5afb940d1083 100644 (file)
@@ -1,3 +1,5 @@
+# TODO:
+# - init script
 Summary:       This is the DENTS nameserver
 Summary(pl):   Serwer nazw DENTS
 Name:          dents
@@ -5,12 +7,13 @@ Version:      0.3.1
 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
@@ -37,17 +40,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
 
This page took 0.139696 seconds and 4 git commands to generate.