%define epoch 0 %define name colamd %define NAME COLAMD %define version 2.8.0 %define release %mkrel 2 %define major %{version} %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d Name: %{name} Version: %{version} Release: %{release} Epoch: %{epoch} Summary: Routines for computing column approximate minimum degree ordering Group: System/Libraries License: LGPL URL: http://www.cise.ufl.edu/research/sparse/colamd/ Source0: http://www.cise.ufl.edu/research/sparse/colamd/%{NAME}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version} BuildRequires: suitesparse-common-devel >= 3.2.0-2 %description The COLAMD column approximate minimum degree ordering algorithm computes a permutation vector P such that the LU factorization of A (:,P) tends to be sparser than that of A. The Cholesky factorization of (A (:,P))'*(A (:,P)) will also tend to be sparser than that of A'*A. %package -n %{libname} Summary: Library of routines for computing column approximate minimum degree ordering Group: System/Libraries Provides: %{libname} = %{epoch}:%{version}-%{release} Obsoletes: %mklibname %{name} 2 %description -n %{libname} The COLAMD column approximate minimum degree ordering algorithm computes a permutation vector P such that the LU factorization of A (:,P) tends to be sparser than that of A. The Cholesky factorization of (A (:,P))'*(A (:,P)) will also tend to be sparser than that of A'*A. This package contains the library needed to run programs dynamically linked against %{NAME}. %package -n %{develname} Summary: C routines for computing column approximate minimum degree ordering Group: Development/C Requires: suitesparse-common-devel >= 3.0.0 Requires: %{libname} = %{epoch}:%{version}-%{release} Provides: %{name}-devel = %{epoch}:%{version}-%{release} Obsoletes: %mklibname %{name} 2 -d Obsoletes: %mklibname %{name} 2 -d -s %description -n %{develname} The COLAMD column approximate minimum degree ordering algorithm computes a permutation vector P such that the LU factorization of A (:,P) tends to be sparser than that of A. The Cholesky factorization of (A (:,P))'*(A (:,P)) will also tend to be sparser than that of A'*A. This package contains the files needed to develop applications which use %{name}. %prep %setup -q -c %setup -q -D -n %{name}-%{version}/%{NAME} mkdir ../SuiteSparse_config ln -sf %{_includedir}/suitesparse/SuiteSparse_config.* ../SuiteSparse_config %build pushd Lib %make -f Makefile CC=%__cc CFLAGS="%{optflags} -fPIC -I%{_includedir}/suitesparse" INC= %__cc -shared -Wl,-soname,lib%{name}.so.%{major} -o lib%{name}.so.%{version} -lm *.o popd %install %__rm -rf %{buildroot} %__install -d -m 755 %{buildroot}%{_libdir} %__install -d -m 755 %{buildroot}%{_includedir}/suitesparse for f in Lib/*.so*; do %__install -m 755 $f %{buildroot}%{_libdir}/`basename $f` done for f in Lib/*.a; do %__install -m 644 $f %{buildroot}%{_libdir}/`basename $f` done for f in Include/*.h; do %__install -m 644 $f %{buildroot}%{_includedir}/suitesparse/`basename $f` done %__ln_s lib%{name}.so.%{version} %{buildroot}%{_libdir}/lib%{name}.so %__install -d -m 755 %{buildroot}%{_docdir}/%{name} %__install -m 644 README.txt Doc/*.txt Doc/ChangeLog %{buildroot}%{_docdir}/%{name} %clean %__rm -rf %{buildroot} %files -n %{libname} %defattr(-,root,root) %{_libdir}/*.so.* %files -n %{develname} %defattr(-,root,root) %{_docdir}/%{name} %{_includedir}/* %{_libdir}/*.so %{_libdir}/*.a %changelog * Fri Jan 11 2013 umeabot <umeabot> 0:2.8.0-2.mga3 + Revision: 348000 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Sat Sep 22 2012 grenoya <grenoya> 0:2.8.0-1.mga3 + Revision: 296597 -new version 2.8.0 - adapt spec to new suitesparse-common-devel * Tue Apr 12 2011 grenoya <grenoya> 0:2.7.3-1.mga1 + Revision: 83700 - clean old Mdv syntax - imported package colamd