rpms/atlas/F-12 README.Fedora,1.3,1.4 atlas.spec,1.29,1.30

Deji Akingunola deji at fedoraproject.org
Sun Oct 25 21:07:44 UTC 2009


Author: deji

Update of /cvs/pkgs/rpms/atlas/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv32016

Modified Files:
	README.Fedora atlas.spec 
Log Message:
* Sat Oct 24 2009 Deji Akingunola <dakingun at gmail.com> - 3.8.3-12
- Use alternatives to workaround multilib conflicts (BZ#508565). 



Index: README.Fedora
===================================================================
RCS file: /cvs/pkgs/rpms/atlas/F-12/README.Fedora,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- README.Fedora	16 Dec 2008 05:20:14 -0000	1.3
+++ README.Fedora	25 Oct 2009 21:07:43 -0000	1.4
@@ -38,10 +38,14 @@ lapack libraries that should work as a d
 standard ones (they are installed in /usr/lib{64}/atlas* rather than
 /usr/lib{64}).
 
-For i386 systems, 3 ATLAS subpackages are built for SSE1, SSE2, and SSE3 ix86
-extensions, using architectural defaults obtained from PIII, Pentium 4 with
-SSE2 extension and PENTIUM 4 with SSE3 extensions respectively.
+For i386 systems, 4 ATLAS subpackages are built for 3Dnow, SSE1, SSE2, and SSE3
+ix86 extensions, using architectural defaults obtained from Athlon K7, PIII, Pentium 4 with SSE2 extension and PENTIUM 4 with SSE3 extensions respectively.
 
+This packaging allows multiple installation of different atlas sub-packages
+at the same time. The alternatives system (read 'man alternatives' for usage)
+is used in the -devel subpackages to select the appropriate location for the 
+architectural dependent header files.
+ 
 This package is designed to build RPMs that are identical regardless
 of where they are compiled and that provide reasonable performance on
 a wide range of hardware. For users who want optimal performance on
@@ -49,7 +53,7 @@ particular hardware, custom RPMs can be 
 by setting the RPM macro "enable_native_atlas" to a value of 1. This
 can be done from the command line as in the following example:
 
-rpmbuild -D "enable_native_atlas 1" --rebuild atlas-3.8.2-1.src.rpm
+rpmbuild -D "enable_native_atlas 1" --rebuild atlas-3.8.3-1.src.rpm
 
 This will cause the ATLAS build to use the achitectural default most
 appropriate for the system on which the package is to be built.


Index: atlas.spec
===================================================================
RCS file: /cvs/pkgs/rpms/atlas/F-12/atlas.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -p -r1.29 -r1.30
--- atlas.spec	27 Sep 2009 01:04:33 -0000	1.29
+++ atlas.spec	25 Oct 2009 21:07:43 -0000	1.30
@@ -2,7 +2,7 @@
 
 Name:           atlas
 Version:        3.8.3
-Release:        10%{?dist}
+Release:        12%{?dist}
 Summary:        Automatically Tuned Linear Algebra Software
 
 Group:          System Environment/Libraries
@@ -37,7 +37,9 @@ see the documentation for information.
 Summary:        Development libraries for ATLAS
 Group:          Development/Libraries
 Requires:       %{name} = %{version}-%{release}
-Obsoletes:	%name-header = %version-%release
+Obsoletes:	%name-header <= %version-%release
+Requires(posttans):	chkconfig
+Requires(preun):	chkconfig
 
 %description devel
 This package contains the static libraries and headers for development
@@ -65,7 +67,9 @@ and SSE3 extensions.
 Summary:        Development libraries for ATLAS with 3DNow extensions
 Group:          Development/Libraries
 Requires:       %{name}-3dnow = %{version}-%{release}
-Obsoletes:	%name-header = %version-%release
+Obsoletes:	%name-header <= %version-%release
+Requires(posttans):	chkconfig
+Requires(preun):	chkconfig
 
 %description 3dnow-devel
 This package contains headers and shared and static versions of the ATLAS
@@ -86,7 +90,9 @@ extensions.
 Summary:        Development libraries for ATLAS with SSE extensions
 Group:          Development/Libraries
 Requires:       %{name}-sse = %{version}-%{release}
-Obsoletes:	%name-header = %version-%release
+Obsoletes:	%name-header <= %version-%release
+Requires(posttans):	chkconfig
+Requires(preun):	chkconfig
 
 %description sse-devel
 This package contains headers and shared and static versions of the ATLAS
@@ -107,7 +113,9 @@ SSE(1) and SSE3 extensions.
 Summary:        Development libraries for ATLAS with SSE2 extensions
 Group:          Development/Libraries
 Requires:       %{name}-sse2 = %{version}-%{release}
-Obsoletes:	%name-header = %version-%release
+Obsoletes:	%name-header <= %version-%release
+Requires(posttans):	chkconfig
+Requires(preun):	chkconfig
 
 %description sse2-devel
 This package contains shared and static versions of the ATLAS
@@ -127,7 +135,9 @@ Fedora also produces ATLAS build with SS
 Summary:        Development libraries for ATLAS with 3DNow extensions
 Group:          Development/Libraries
 Requires:       %{name}-sse3 = %{version}-%{release}
-Obsoletes:	%name-header = %version-%release
+Obsoletes:	%name-header <= %version-%release
+Requires(posttans):	chkconfig
+Requires(preun):	chkconfig
 
 %description sse3-devel
 This package contains shared and static versions of the ATLAS
@@ -137,12 +147,6 @@ optimizations for the sse3 extensions to
 %endif
 %endif
 
-%ifarch x86_64 ppc64 s390x
-%define mode 64
-%else
-%define mode 32
-%endif
-
 %prep
 %setup -q -n ATLAS
 %patch0 -p0 -b .shared
@@ -154,12 +158,13 @@ cp %{SOURCE3} doc
 for type in %{types}; do
 	if [ "$type" = "base" ]; then
 		libname=atlas
+		%define pr_base %(echo $((%{__isa_bits}+0)))
 	else
 		libname=atlas-${type}
 	fi
 	mkdir -p %{_arch}_${type}
 	pushd %{_arch}_${type}
-	../configure -b %{mode} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\
+	../configure -b %{__isa_bits} -D c -DWALL -Fa alg '-g -Wa,--noexecstack -fPIC'\
 	--prefix=%{buildroot}%{_prefix}			\
 	--incdir=%{buildroot}%{_includedir}		\
 	--libdir=%{buildroot}%{_libdir}/${libname}	\
@@ -174,16 +179,20 @@ for type in %{types}; do
 		sed -i 's#ARCH =.*#ARCH = K7323DNow#' Make.inc
 		sed -i 's#-DATL_SSE3 -DATL_SSE2 -DATL_SSE1##' Make.inc 
 		sed -i 's#-mfpmath=sse -msse3#-mfpmath=387#' Make.inc 
+		%define pr_3dnow %(echo $((%{__isa_bits}+1)))
 	elif [ "$type" = "sse" ]; then
 		sed -i 's#ARCH =.*#ARCH = PIII32SSE1#' Make.inc
 		sed -i 's#-DATL_SSE3 -DATL_SSE2##' Make.inc 
 		sed -i 's#-msse3#-msse#' Make.inc 
+		%define pr_sse %(echo $((%{__isa_bits}+2)))
 	elif [ "$type" = "sse2" ]; then
 		sed -i 's#ARCH =.*#ARCH = P432SSE2#' Make.inc
 		sed -i 's#-DATL_SSE3##' Make.inc 
 		sed -i 's#-msse3#-msse2#' Make.inc 
+		%define pr_sse2 %(echo $((%{__isa_bits}+3)))
 	elif [ "$type" = "sse3" ]; then
 		sed -i 's#ARCH =.*#ARCH = P4E32SSE3#' Make.inc
+		%define pr_sse3 %(echo $((%{__isa_bits}+4)))
 	fi
 %endif
 	make build
@@ -198,6 +207,7 @@ rm -rf %{buildroot}
 for type in %{types}; do
 	pushd %{_arch}_${type}
 	make DESTDIR=%{buildroot} install
+        mv %{buildroot}%{_includedir}/atlas %{buildroot}%{_includedir}/atlas-%{_arch}-${type}
 	if [ "$type" = "base" ]; then
 		cp -pr lib/*.so* %{buildroot}%{_libdir}/atlas/
 	else
@@ -214,6 +224,8 @@ for type in %{types}; do
 		> %{buildroot}/etc/ld.so.conf.d/atlas-${type}.conf
 	fi
 done
+mkdir -p %{buildroot}%{_includedir}/atlas
+
 
 %clean
 rm -rf %{buildroot}
@@ -222,24 +234,79 @@ rm -rf %{buildroot}
 
 %postun -p /sbin/ldconfig
 
+%posttrans devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-base %{pr_base}
+fi
+
+%preun devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-base
+fi
+
 %ifarch %{ix86} && %if "%{?enable_native_atlas}" == "0"
 
 %post -n atlas-3dnow -p /sbin/ldconfig
 
 %postun -n atlas-3dnow -p /sbin/ldconfig
 
+%posttrans 3dnow-devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-3dnow  %{pr_3dnow}
+fi
+
+%preun 3dnow-devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-3dnow
+fi
+
 %post -n atlas-sse -p /sbin/ldconfig
 
 %postun -n atlas-sse -p /sbin/ldconfig
 
+%posttrans sse-devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-sse  %{pr_sse}
+fi
+
+%preun sse-devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse
+fi
+
 %post -n atlas-sse2 -p /sbin/ldconfig
 
 %postun -n atlas-sse2 -p /sbin/ldconfig
 
+%posttrans sse2-devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-sse2  %{pr_sse2}
+fi
+
+%preun sse2-devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse2
+fi
+
 %post -n atlas-sse3 -p /sbin/ldconfig
 
 %postun -n atlas-sse3 -p /sbin/ldconfig
 
+%posttrans sse3-devel
+if [ $1 -eq 0 ] ; then
+/usr/sbin/alternatives	--install %{_includedir}/atlas atlas-inc 	\
+		%{_includedir}/atlas-%{_arch}-sse3  %{pr_sse3}
+fi
+
+%preun sse3-devel
+if [ $1 -ge 0 ] ; then
+/usr/sbin/alternatives --remove atlas-inc %{_includedir}/atlas-%{_arch}-sse3
+fi
+
 %endif
 
 %files
@@ -254,8 +321,9 @@ rm -rf %{buildroot}
 %doc doc
 %{_libdir}/atlas/*.so
 %{_libdir}/atlas/*.a
-%{_includedir}/atlas
+%{_includedir}/atlas-%{_arch}-base/
 %{_includedir}/*.h
+%ghost %{_includedir}/atlas
 
 %ifarch %{ix86} && %if "%{?enable_native_atlas}" == "0"
 
@@ -271,8 +339,9 @@ rm -rf %{buildroot}
 %doc doc
 %{_libdir}/atlas-3dnow/*.so
 %{_libdir}/atlas-3dnow/*.a
-%{_includedir}/atlas
+%{_includedir}/atlas-%{_arch}-3dnow/
 %{_includedir}/*.h
+%ghost %{_includedir}/atlas
 
 %files sse
 %defattr(-,root,root,-)
@@ -286,8 +355,9 @@ rm -rf %{buildroot}
 %doc doc
 %{_libdir}/atlas-sse/*.so
 %{_libdir}/atlas-sse/*.a
-%{_includedir}/atlas
+%{_includedir}/atlas-%{_arch}-sse/
 %{_includedir}/*.h
+%ghost %{_includedir}/atlas
 
 %files sse2
 %defattr(-,root,root,-)
@@ -301,8 +371,9 @@ rm -rf %{buildroot}
 %doc doc
 %{_libdir}/atlas-sse2/*.so
 %{_libdir}/atlas-sse2/*.a
-%{_includedir}/atlas
+%{_includedir}/atlas-%{_arch}-sse2/
 %{_includedir}/*.h
+%ghost %{_includedir}/atlas
 
 %files sse3
 %defattr(-,root,root,-)
@@ -316,12 +387,19 @@ rm -rf %{buildroot}
 %doc doc
 %{_libdir}/atlas-sse3/*.so
 %{_libdir}/atlas-sse3/*.a
-%{_includedir}/atlas
+%{_includedir}/atlas-%{_arch}-sse3/
 %{_includedir}/*.h
+%ghost %{_includedir}/atlas
 
 %endif
 
 %changelog
+* Sat Oct 24 2009 Deji Akingunola <dakingun at gmail.com> - 3.8.3-12
+- Use alternatives to workaround multilib conflicts (BZ#508565). 
+
+* Tue Sep 29 2009 Deji Akingunola <dakingun at gmail.com> - 3.8.3-11
+- Obsolete the -header subpackage properly. 
+
 * Sat Sep 26 2009 Deji Akingunola <dakingun at gmail.com> - 3.8.3-10
 - Use the new arch. default for Pentium PRO (Fedora bug #510498)
 - (Re-)Introduce 3dNow subpackage




More information about the fedora-extras-commits mailing list