diff --git a/torque.spec b/torque.spec index a0ff68c..ca30dc0 100644 --- a/torque.spec +++ b/torque.spec @@ -3,7 +3,7 @@ %define name torque %define version 2.1.10 #%%define snap 200604251602 -%define release 5 +%define release 6 # The following options are supported: # --with server_name=hostname @@ -98,6 +98,8 @@ URL: http://www.clusterresources.com/products/torque/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Provides: pbs BuildRequires: desktop-file-utils, pam-devel, xauth, readline-devel, ncurses-devel +Requires(posttrans): /usr/sbin/alternatives +Requires(preun): /usr/sbin/alternatives Conflicts: pbspro, openpbs, openpbs-oscar Obsoletes: torque-localhost @@ -177,6 +179,15 @@ desktop-file-install --vendor fedora \ %endif +# alternatives stuff +for bin in qalter qdel qhold qrls qselect qstat qsub +do + mv $RPM_BUILD_ROOT%{_bindir}/$bin $RPM_BUILD_ROOT%{_bindir}/${bin}-torque + mv $RPM_BUILD_ROOT%{_mandir}/man1/${bin}.1 \ + $RPM_BUILD_ROOT%{_mandir}/man1/${bin}-torque.1 +done + + %clean %__rm -rf "$RPM_BUILD_ROOT" @@ -222,6 +233,13 @@ This package holds the documentation files. %defattr(-, root, root) %doc doc/admin_guide.ps %{_mandir}/man*/* +%exclude %{_mandir}/man1/qsub-torque.1.gz +%exclude %{_mandir}/man1/qalter-torque.1.gz +%exclude %{_mandir}/man1/qdel-torque.1.gz +%exclude %{_mandir}/man1/qhold-torque.1.gz +%exclude %{_mandir}/man1/qrls-torque.1.gz +%exclude %{_mandir}/man1/qselect-torque.1.gz +%exclude %{_mandir}/man1/qstat-torque.1.gz %package scheduler @@ -318,6 +336,34 @@ Provides: pbs-client %shared_description This package holds the command-line client programs. +%posttrans client +/usr/sbin/alternatives --install %{_bindir}/qsub qsub %{_bindir}/qsub-torque 10 \ + --slave %{_mandir}/man1/qsub.1.gz qsub-man \ + %{_mandir}/man1/qsub-torque.1.gz \ + --slave %{_bindir}/qalter qalter %{_bindir}/qalter-torque \ + --slave %{_mandir}/man1/qalter.1.gz qalter-man \ + %{_mandir}/man1/qalter-torque.1.gz \ + --slave %{_bindir}/qdel qdel %{_bindir}/qdel-torque \ + --slave %{_mandir}/man1/qdel.1.gz qdel-man \ + %{_mandir}/man1/qdel-torque.1.gz \ + --slave %{_bindir}/qhold qhold %{_bindir}/qhold-torque \ + --slave %{_mandir}/man1/qhold.1.gz qhold-man \ + %{_mandir}/man1/qhold-torque.1.gz \ + --slave %{_bindir}/qrls qrls %{_bindir}/qrls-torque \ + --slave %{_mandir}/man1/qrls.1.gz qrls-man \ + %{_mandir}/man1/qrls-torque.1.gz \ + --slave %{_bindir}/qselect qselect %{_bindir}/qselect-torque \ + --slave %{_mandir}/man1/qselect.1.gz qselect-man \ + %{_mandir}/man1/qselect-torque.1.gz \ + --slave %{_bindir}/qstat qstat %{_bindir}/qstat-torque \ + --slave %{_mandir}/man1/qstat.1.gz qstat-man \ + %{_mandir}/man1/qstat-torque.1.gz + +%preun client +if [ $1 -eq 0 ]; then + /usr/sbin/alternatives --remove qsub %{_bindir}/qsub-torque +fi + %files client %defattr(-, root, root) %{_bindir}/q* @@ -334,6 +380,14 @@ This package holds the command-line client programs. %if %use_tcl %{_bindir}/pbs_tclsh %endif +%{_mandir}/man1/qsub-torque.1.gz +%{_mandir}/man1/qalter-torque.1.gz +%{_mandir}/man1/qdel-torque.1.gz +%{_mandir}/man1/qhold-torque.1.gz +%{_mandir}/man1/qrls-torque.1.gz +%{_mandir}/man1/qselect-torque.1.gz +%{_mandir}/man1/qstat-torque.1.gz + %package gui Group: Applications/System @@ -408,6 +462,9 @@ A simple PAM module to authorize users on PBS MOM nodes with a running job. %changelog +* Mon Apr 16 2008 Garrick Staples 2.1.10-6 +- add alternatives system + * Thu Feb 14 2008 Garrick Staples 2.1.10-5 - fix missing NI_MAXSERV on fedora9