]> git.pld-linux.org Git - packages/binfmt-detector.git/commitdiff
- use %service
authordarekr <darekr@pld-linux.org>
Mon, 1 May 2006 15:42:31 +0000 (15:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    binfmt-detector.spec -> 1.2

binfmt-detector.spec

index 27a4582d2592d0d93c28a067f802394ab5efe041..780e3192edaf0ec4d2225927fc685cdec33e7b53 100644 (file)
@@ -8,6 +8,7 @@ Group:          Base
 Source0:       http://team.pld-linux.org/~wolf/%{name}.tar.gz
 # Source0-md5: 11623bddbeb536e88c47c8a1aedc9189
 Source1:       %{name}.init
+BuildRequires: rpmbuild(macros) >= 1.268
 Conflicts:     wine <= 1:0.9.12-1
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -40,27 +41,23 @@ uruchamia natywnych obraz
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_bindir},/etc/rc.d/init.d}
 
 install binfmt-detector-cli $RPM_BUILD_ROOT%{_bindir}
 install binfmt-detector.sh $RPM_BUILD_ROOT%{_bindir}
 
-install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/binfmt-detector
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/binfmt-detector
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add binfmt-detector
-if [ ! -f /var/lock/subsys/binfmt-detector ]; then
-       echo "Run \"/etc/rc.d/init.d/binfmt-detector start\" to start binfmt-detector service." >&2
-fi
+%service binfmt-detector restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/binfmt-detector ]; then
-               /etc/rc.d/init.d/binfmt-detector stop >&2
-       fi
+       %service binfmt-detector stop
        /sbin/chkconfig --del binfmt-detector
 fi
 
@@ -68,4 +65,4 @@ fi
 %defattr(644,root,root,755)
 %doc README
 %attr(755,root,root) %{_bindir}/*
-%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/binfmt-detector
+%attr(754,root,root) /etc/rc.d/init.d/binfmt-detector
This page took 0.094006 seconds and 4 git commands to generate.