rpms/mpich2/F-9 mpich2.spec,1.2,1.3

Deji Akingunola deji at fedoraproject.org
Thu Mar 19 02:52:01 UTC 2009


Author: deji

Update of /cvs/pkgs/rpms/mpich2/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8060

Modified Files:
	mpich2.spec 
Log Message:
* Wed Mar 18 2009 Deji Akingunola <dakingun at gmail.com> - 1.0.8-4
- Fix un-owned directory (#490270)
- Add Posttrans scriplets to work around 1.0.8-3 scriplet brokenness



Index: mpich2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mpich2/F-9/mpich2.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mpich2.spec	10 Mar 2009 04:34:43 -0000	1.2
+++ mpich2.spec	19 Mar 2009 02:51:30 -0000	1.3
@@ -1,7 +1,7 @@
 Summary:	An implementation of MPI
 Name:		mpich2
 Version:	1.0.8
-Release:	3%{?dist}
+Release:	4%{?dist}
 License:	MIT
 Group:		Development/Libraries
 URL:		http://www.mcs.anl.gov/research/projects/mpich2
@@ -16,6 +16,7 @@
 Requires:	python
 Requires(post):	chkconfig
 Requires(preun):chkconfig
+Requires(posttrans):chkconfig
 #Requires chkconfig for /usr/sbin/alternatives
 
 %description
@@ -39,8 +40,9 @@
 Requires:	%{name} = %{version}-%{release}
 Requires:	pkgconfig
 Requires:	gcc-gfortran
-Requires(post):	/usr/sbin/alternatives
-Requires(preun):/usr/sbin/alternatives
+Requires(post): chkconfig
+Requires(preun):chkconfig
+Requires(posttrans):chkconfig
 
 %description devel
 Contains development headers and libraries for mpich2
@@ -161,6 +163,24 @@
 rm -rf %{buildroot}
 
 %post
+if [ $1 -eq 1 ] ; then
+/usr/sbin/alternatives	\
+	--install %{_bindir}/mpirun mpi-run %{_bindir}/mpiexec.py 41	\
+	--slave	%{_bindir}/mpiexec mpi-exec %{_bindir}/mpiexec.py	\
+	--slave	%{_mandir}/man1/mpiexec.1.gz mpi-exec-man		\
+			%{_mandir}/man1/mp-mpiexec.1.gz		\
+	--slave	%{_mandir}/man1/mpif90.1.gz mpif90-man		\
+			%{_mandir}/man1/mp-mpif90.1.gz		\
+	--slave	%{_mandir}/man1/mpif77.1.gz mpif77-man		\
+			%{_mandir}/man1/mp-mpif77.1.gz		\
+	--slave	%{_mandir}/man1/mpicc.1.gz mpicc-man		\
+			%{_mandir}/man1/mp-mpicc.1.gz		\
+	--slave	%{_mandir}/man1/mpic++.1.gz mpic++-man		\
+			%{_mandir}/man1/mp-mpicxx.1.gz
+fi
+
+%posttrans
+if [ $1 -eq 0 ] ; then
 /usr/sbin/alternatives	\
 	--install %{_bindir}/mpirun mpi-run %{_bindir}/mpiexec.py 41	\
 	--slave	%{_bindir}/mpiexec mpi-exec %{_bindir}/mpiexec.py	\
@@ -174,24 +194,41 @@
 			%{_mandir}/man1/mp-mpicc.1.gz		\
 	--slave	%{_mandir}/man1/mpic++.1.gz mpic++-man		\
 			%{_mandir}/man1/mp-mpicxx.1.gz
+fi
 
 %preun
+if [ $1 -eq 0 ] ; then
 /usr/sbin/alternatives --remove mpi-run %{_bindir}/mpiexec.py
+fi
 
 %post devel
+if [ $1 -eq 1 ] ; then
 /usr/sbin/alternatives	\
 	--install %{_bindir}/mpicc mpicc %{_bindir}/mp%{mode}-mpicc %{priority}\
 	--slave	%{_bindir}/mpicxx  mpicxx  %{_bindir}/mp%{mode}-mpicxx	\
 	--slave	%{_bindir}/mpif90  mpif90  %{_bindir}/mp%{mode}-mpif90	\
 	--slave	%{_bindir}/mpif77  mpif77  %{_bindir}/mp%{mode}-mpif77
+fi
+
+%posttrans devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	\
+	--install %{_bindir}/mpicc mpicc %{_bindir}/mp%{mode}-mpicc %{priority}\
+	--slave	%{_bindir}/mpicxx  mpicxx  %{_bindir}/mp%{mode}-mpicxx	\
+	--slave	%{_bindir}/mpif90  mpif90  %{_bindir}/mp%{mode}-mpif90	\
+	--slave	%{_bindir}/mpif77  mpif77  %{_bindir}/mp%{mode}-mpif77
+fi
 
 %preun devel
+if [ $1 -eq 0 ] ; then
 /usr/sbin/alternatives --remove mpicc %{_bindir}/mp%{mode}-mpicc
+fi
 
 %files
 %defattr(-,root,root,-)
 %{_bindir}/*
 %dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/bin%{mode}
 %{_datadir}/%{name}/bin%{mode}/mpiexec
 %{_datadir}/%{name}/bin%{mode}/mpirun
 %exclude %{_bindir}/mp%{mode}-mpicc
@@ -235,6 +272,10 @@
 %doc README.testing README.romio README.developer
 
 %changelog
+* Wed Mar 18 2009 Deji Akingunola <dakingun at gmail.com> - 1.0.8-4
+- Fix un-owned directory (#490270)
+- Add Posttrans scriplets to work around 1.0.8-3 scriplet brokenness
+
 * Mon Mar 09 2009 Deji Akingunola <dakingun at gmail.com> - 1.0.8-3
 - Drop the ssm channel from ppc* archs, it fails to build
 - Python scripts in bindir and sbindir are no longer bytecompiled (F-11+)




More information about the fedora-extras-commits mailing list