]> git.pld-linux.org Git - packages/em8300.git/commitdiff
- use %service
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 22 Oct 2007 19:37:04 +0000 (19:37 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    em8300.spec -> 1.49.2.13

em8300.spec

index aa0ec3cf249385a7bfc7ca977ce4dea8e86eaa75..cbf0704c5c5520ed11775a506180a858baabbd6b 100644 (file)
@@ -45,9 +45,10 @@ BuildRequires:       pkgconfig
 %endif
 %if %{with kernel}
 %{?with_dist_kernel:BuildRequires:     kernel%{_alt_kernel}-module-build >= 3:2.6.14}
-BuildRequires: rpmbuild(macros) >= 1.308
 %endif
+BuildRequires: rpmbuild(macros) >= 1.308
 Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
 Provides:      dxr3
 Obsoletes:     em8300-libs
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -163,7 +164,7 @@ for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}
                M=$PWD O=$PWD/o \
                %{?with_verbose:V=1}
        %{__make} -C %{_kernelsrcdir} modules \
-               CC="%{__cc}" CPP="%{__cpp}" \
+                       CC="%{__cc}" CPP="%{__cpp}" \
                SYSSRC=%{_kernelsrcdir} \
                SYSOUT=$PWD/o \
                M=$PWD O=$PWD/o \
@@ -205,17 +206,11 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add %{name}
-if [ -f /var/lock/subsys/%{name} ]; then
-       /etc/rc.d/init.d/%{name} restart 1>&2
-else
-       echo "Run \"/etc/rc.d/init.d/%{name} start\" to load %{name} modules."
-fi
+%service %{name} restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/%{name} ]; then
-               /etc/rc.d/init.d/%{name} stop 1>&2
-       fi
+       %service stop
        /sbin/chkconfig --del %{name}
 fi
 
This page took 0.037501 seconds and 4 git commands to generate.