rpms/torque/devel torque.spec,1.31,1.32

Garrick Staples (garrick) fedora-extras-commits at redhat.com
Thu Apr 17 05:34:00 UTC 2008


Author: garrick

Update of /cvs/extras/rpms/torque/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14806

Modified Files:
	torque.spec 
Log Message:
* Mon Apr 16 2008 Garrick Staples <garrick at usc.edu> 2.1.10-6
- add alternatives system



Index: torque.spec
===================================================================
RCS file: /cvs/extras/rpms/torque/devel/torque.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- torque.spec	14 Feb 2008 21:14:23 -0000	1.31
+++ torque.spec	17 Apr 2008 05:33:24 -0000	1.32
@@ -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 @@
 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 @@
 %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 @@
 %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 @@
 %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 @@
 %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 @@
 
 
 %changelog
+* Mon Apr 16 2008 Garrick Staples <garrick at usc.edu> 2.1.10-6
+- add alternatives system
+
 * Thu Feb 14 2008 Garrick Staples <garrick at usc.edu> 2.1.10-5
 - fix missing NI_MAXSERV on fedora9
 




More information about the fedora-extras-commits mailing list