Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 123b2f13037c1b8d67e7302146253f10 > files > 2

cxsparse-2.2.3-1mdv2010.1.src.rpm

%define epoch		0

%define name		cxsparse
%define NAME		CXSparse
%define version		2.2.3
%define release		%mkrel 1
%define major		%{version}
%define libname		%mklibname %{name} %{major}
%define develname	%mklibname %{name} -d

Name:		%{name}
Version:	%{version}
Release:	%{release}
Epoch:		%{epoch}
Summary:	Direct methods for sparse linear systems
Group:		System/Libraries
License:	LGPL
URL:		http://www.cise.ufl.edu/research/sparse/CXSparse/
Source0:	http://www.cise.ufl.edu/research/sparse/CXSparse/%{NAME}-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}
BuildRequires:	suitesparse-common-devel >= 3.2.0-2

%description
CSparse is a package of direct methods for sparse linear systems written
to complement the book "Direct Methods for Sparse Linear Systems", by
Timothy A. Davis. The algorithms in CSparse have been chosen with 
five goals in mind:

(1) they must embody much of the theory behind sparse matrix algorithms,
(2) they must be either asymptotically optimal in their run time and memory
    usage or be fast in practice,
(3) they must be concise so as to be easily understood and short enough to
    print in the book,
(4) they must cover a wide spectrum of matrix operations, and
(5) they must be accurate and robust.

The focus is on direct methods; iterative methods and solvers for
eigenvalue problems are beyond the scope of this package.

CXSparse is a version of CSparse that operates on both real and complex
matrices, using either int or UF_long integers.

%package -n %{libname}
Summary:	Library of direct methods for sparse linear systems
Group:		System/Libraries
Provides:	%{libname} = %{epoch}:%{version}-%{release}
Obsoletes:	%mklibname %{name} 2
Obsoletes:	%mklibname %{name} 2.2.1

%description -n %{libname}
CSparse is a package of direct methods for sparse linear systems written
to complement the book "Direct Methods for Sparse Linear Systems", by
Timothy A. Davis. The algorithms in CSparse have been chosen with 
five goals in mind:

(1) they must embody much of the theory behind sparse matrix algorithms,
(2) they must be either asymptotically optimal in their run time and memory
    usage or be fast in practice,
(3) they must be concise so as to be easily understood and short enough to
    print in the book,
(4) they must cover a wide spectrum of matrix operations, and
(5) they must be accurate and robust.

The focus is on direct methods; iterative methods and solvers for
eigenvalue problems are beyond the scope of this package.

CXSparse is a version of CSparse that operates on both real and complex
matrices, using either int or UF_long integers.

This package contains the library needed to run programs dynamically
linked against %{NAME}.

%package -n %{develname}
Summary:	C direct methods for sparse linear systems
Group:		Development/C
Requires:	suitesparse-common-devel >= 3.2.0-2
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}
CSparse is a package of direct methods for sparse linear systems written
to complement the book "Direct Methods for Sparse Linear Systems", by
Timothy A. Davis. The algorithms in CSparse have been chosen with 
five goals in mind:

(1) they must embody much of the theory behind sparse matrix algorithms,
(2) they must be either asymptotically optimal in their run time and memory
    usage or be fast in practice,
(3) they must be concise so as to be easily understood and short enough to
    print in the book,
(4) they must cover a wide spectrum of matrix operations, and
(5) they must be accurate and robust.

The focus is on direct methods; iterative methods and solvers for
eigenvalue problems are beyond the scope of this package.

CXSparse is a version of CSparse that operates on both real and complex
matrices, using either int or UF_long integers.

This package contains the files needed to develop applications which
use %{name}.

%prep
%setup -q -c 
%setup -q -D -n %{name}-%{version}/%{NAME}
mkdir ../UFconfig
ln -sf %{_includedir}/suitesparse/UFconfig.* ../UFconfig

%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}

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.*

%files -n %{develname}
%defattr(-,root,root)
%{_docdir}/%{name}
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a


%changelog
* Wed Dec 23 2009 Lev Givon <lev@mandriva.org> 0:2.2.3-1mdv2010.1
+ Revision: 481804
- Update to 2.2.3.

* Thu Sep 10 2009 Thierry Vignaud <tvignaud@mandriva.com> 0:2.2.2-5mdv2010.0
+ Revision: 437217
- rebuild

* Wed Dec 03 2008 Lev Givon <lev@mandriva.org> 0:2.2.2-4mdv2009.1
+ Revision: 309545
- Use UFconfig files from suitesparse-common-devel package.

* Tue Dec 02 2008 Lev Givon <lev@mandriva.org> 0:2.2.2-3mdv2009.1
+ Revision: 309439
- Another obsolete.

* Tue Dec 02 2008 Lev Givon <lev@mandriva.org> 0:2.2.2-2mdv2009.1
+ Revision: 309411
- Update UFconfig, use epoch.
  Obsolete libs created by old suitesparse package.

* Mon Dec 01 2008 Lev Givon <lev@mandriva.org> 2.2.2-1mdv2009.1
+ Revision: 308929
- Update to 2.2.2.

* Wed Jul 23 2008 Thierry Vignaud <tvignaud@mandriva.com> 2.2.1-6mdv2009.0
+ Revision: 243853
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Wed Jan 02 2008 Lev Givon <lev@mandriva.org> 2.2.1-4mdv2008.1
+ Revision: 140615
- Move docs to devel package.

* Wed Jan 02 2008 Lev Givon <lev@mandriva.org> 2.2.1-3mdv2008.1
+ Revision: 140440
- Don't obsolete old libraries.

* Wed Jan 02 2008 Lev Givon <lev@mandriva.org> 2.2.1-2mdv2008.1
+ Revision: 140189
- Obsolete old static devel package.

* Tue Jan 01 2008 Lev Givon <lev@mandriva.org> 2.2.1-1mdv2008.1
+ Revision: 140154
- import cxsparse