]> git.pld-linux.org Git - packages/eqnx.git/blobdiff - eqnx.spec
- standard chkconfig and rc-scripts usage
[packages/eqnx.git] / eqnx.spec
index 6dd4c9c69ac2485e5f5f3e79ae779d84f0fed0a8..8a37674959a79b621c4f1dc13575dfb6489fa03b 100644 (file)
--- a/eqnx.spec
+++ b/eqnx.spec
@@ -1,16 +1,17 @@
 Summary:       Device driver/utilities for Equinox SST SuperSerial family
-Summary(pl):   Serowniki do karty Equinox SST SuperSerial
+Summary(pl):   Sterowniki do karty Equinox SST SuperSerial
 Name:          eqnx
 Version:       4.04
 Release:       1
 License:       GPL
 Group:         Applications/Communications
-URL:           http://www.equinox.com
-Vendor:                Equinox Systems, Inc.
-ExclusiveOS:   Linux
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Source0:       %{name}-%{version}-1.tar.gz
+# Source0-md5: 3b335ac7f525036ad3147907adcd0ec8
 Patch0:                %{name}-misc.patch
+URL:           http://www.equinox.com/
+BuildRequires: rpmbuild(macros) >= 1.268
+ExclusiveOS:   Linux
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Provides device driver and diagnostic utilities for Equinox
@@ -19,6 +20,13 @@ driver supports ISA, EISA and PCI versions of the 2, 4, 8 and 16 port
 boards as well as the expandable 64 and 128 port boards and the 4RJ
 and 8RJ boards. ISA and EISA are not available on Itanium systems.
 
+%description -l pl
+Ten pakiet zawiera sterownik i narzêdzia diagnostyczne dla kart
+wieloportowych i rozszerzalnych kontrolerów Equinox SuperSerial. Ten
+sterownik obs³uguje wersje ISA, EISA i PCI kart 2, 4, 8 i
+16-portowych, a tak¿e rozszerzalne karty 64 i 128-portowe oraz karty
+4RJ i 8RJ. ISA i EISA nie s± dostêpne w systemach Itanium.
+
 %prep
 %setup -q -n %{name}-%{version}-1
 %patch0 -p1
@@ -37,53 +45,34 @@ exit 1
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%preun
-# check driver usage.  If ports in use, disallow the remove
-if [ -e /sbin/chkconfig ]
-then
-       /sbin/chkconfig eqnx
-       if [ $? != 0 ]
-       then
-               exit 0
-       fi
-fi
+%post
+/sbin/chkconfig --add eqnx
+%service eqnx restart
 
-if [ -f /etc/rc.d/init.d/eqnx ]
-then
-       /etc/rc.d/init.d/eqnx status > /dev/null 2>&1
-       if [ $? != 0 ]
-       then
+%preun
+if [ "$1" = 0 ]; then
+       # check driver usage.  If ports in use, disallow the remove
+       /sbin/service eqnx status > /dev/null 2>&1
+       if [ $? != 0 ]; then
                echo "eqnx driver in use, unable to unload"
                echo "Please stop all processes running on SST ports"
                exit 1
        fi
-fi
 
-# stop the driver + remove device files
-if [ -f /etc/rc.d/init.d/eqnx ]
-then
-       /etc/rc.d/init.d/eqnx stop
-fi
+       # stop the driver + remove device files
+       %service eqnx stop
+       /sbin/chkconfig --del eqnx
 
-# remove eqnx from startup scripts
-if [ -e /usr/sbin/eqnx-installrc ]
-then
+       # remove eqnx from startup scripts
        /usr/sbin/eqnx-installrc -u
 fi
 
-%post
-echo "To complete installation of the Equinox SST product:"
-echo "   1. /etc/rc.d/init.d/eqnx start"
-echo "   2. ensure this script is invoked at boot-time"
-echo "     (such as chkconfig --add eqnx, for redhat, etc.)"
-echo "   Refer to installation notes for more information".
-
 %files
 %defattr(644,root,root,755)
 %doc inst/INSTALL.TXT
 %doc inst/RELEASE.TXT
 %doc utils/ssdiag/README.ssdiag
-/etc/rc.d/init.d/eqnx
+%attr(754,root,root) /etc/rc.d/init.d/eqnx
 /lib/modules/*/*/*
 %attr(755,root,root) %{_bindir}/sscode
 %attr(755,root,root) %{_bindir}/ssdiag
This page took 0.07929 seconds and 4 git commands to generate.