207 lines
6.2 KiB
RPMSpec
207 lines
6.2 KiB
RPMSpec
Name: ufsparse
|
|
Version: 0.9
|
|
Release: 2%{?dist}
|
|
Summary: University of Florida sparse matrix libraries
|
|
|
|
Group: System Environment/Libraries
|
|
License: Distributable
|
|
URL: http://www.cise.ufl.edu/research/sparse/umfpack/
|
|
Source0: http://www.cise.ufl.edu/research/sparse/beta/Aug31_2005/UFsparse.tar.gz
|
|
Patch0: patch.UFsparse
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|
|
|
BuildRequires: blas-devel
|
|
Obsoletes: umfpack
|
|
|
|
%description
|
|
ufsparse is a collection of libraries for computations involving sparse
|
|
matrices. The package includes the following libraries:
|
|
AMD approximate minimum degree ordering
|
|
COLAMD column approximate minimum degree ordering
|
|
CCOLAMD constrained column approximate minimum degree ordering
|
|
KLU sparse LU factorization, primarily for circuit simulation
|
|
UMFPACK sparse LU factorization
|
|
|
|
Note that an additional library, CHOLMOD (sparse Cholesky factorization),
|
|
is part of the source package, but is not compiled because it requires
|
|
an external library METIS, which is distributed under non-free licensing
|
|
terms that make it ineligible for inclusion in Fedora Extras.
|
|
|
|
|
|
%package devel
|
|
Summary: Development headers and files for UFSparse
|
|
Group: Development/Libraries
|
|
Requires: %{name} = %{version}-%{release}
|
|
Obsoletes: umfpack-devel
|
|
|
|
%description devel
|
|
The ufsparse-devel package contains files needed for developing
|
|
applications which use the ufsparse libraries.
|
|
|
|
|
|
%prep
|
|
%setup -q -n UFsparse
|
|
%patch0 -p0
|
|
|
|
|
|
%build
|
|
%define amd_version 1.2
|
|
%define amd_version_major 1
|
|
mkdir Devel
|
|
mkdir Doc
|
|
mkdir Lib
|
|
mkdir Include
|
|
pushd AMD
|
|
pushd Source
|
|
make -f Makefile CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
|
gcc -shared -Wl,-soname,libamd.so.%{amd_version_major} -o ../Lib/libamd.so.%{amd_version} `ls *.o`
|
|
popd
|
|
cp Lib/*.a Lib/*.so* ../Lib
|
|
cp Include/*.h ../Include
|
|
mkdir ../Doc/AMD/
|
|
cp README.txt Doc/License Doc/ChangeLog ../Doc/AMD/
|
|
mkdir ../Devel/AMD/
|
|
cp Doc/*.pdf ../Devel/AMD/
|
|
popd
|
|
pushd Lib
|
|
ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}
|
|
ln -sf libamd.so.%{amd_version} libamd.so
|
|
popd
|
|
|
|
%define ccolamd_version 1.0
|
|
%define ccolamd_version_major 1
|
|
pushd CCOLAMD
|
|
make -f Makefile CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
|
gcc -shared -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o libccolamd.so.%{ccolamd_version} `ls *.o`
|
|
cp *.a *.so* ../Lib
|
|
cp *.h ../Include
|
|
mkdir ../Doc/CCOLAMD/
|
|
cp README.txt lesser.txt ChangeLog ../Doc/CCOLAMD
|
|
popd
|
|
pushd Lib
|
|
ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}
|
|
ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so
|
|
popd
|
|
|
|
### The code below can be used to compile the cholmod library, but it is
|
|
### disabled because it requires the METIS library, which has a non-free
|
|
### license, and therefore can not be included in Fedora Extras.
|
|
#%define cholmod_version 0.6
|
|
#%define cholmod_version_major 0
|
|
#pushd CHOLMOD
|
|
# pushd Lib
|
|
# make -f Makefile CFLAGS="$RPM_OPT_FLAGS -I/usr/include/metis -fPIC"
|
|
# gcc -shared -Wl,-soname,libcholmod.so.%{cholmod_version_major} -o ../Lib/libcholmod.so.%{cholmod_version} `ls *.o`
|
|
# popd
|
|
# cp Lib/*.a Lib/*.so* ../Lib
|
|
# cp Include/*.h ../Include
|
|
# mkdir ../Doc/CHOLMOD
|
|
# cp README.txt ../Doc/CHOLMOD/
|
|
# cp Cholesky/License.txt ../Doc/CHOLMOD/Cholesky_License.txt
|
|
# cp Core/License.txt ../Doc/CHOLMOD/Core_License.txt
|
|
# cp MatrixOps/License.txt ../Doc/CHOLMOD/MatrixOps_License.txt
|
|
# cp Partition/License.txt ../Doc/CHOLMOD/Partition_License.txt
|
|
# cp Supernodal/License.txt ../Doc/CHOLMOD/Supernodal_License.txt
|
|
# mkdir ../Devel/CHOLMOD/
|
|
# cp Doc/*.pdf ../Devel/CHOLMOD/
|
|
#popd
|
|
#pushd Lib
|
|
# ln -sf libcholmod.so.%{cholmod_version} libcholmod.so.%{cholmod_version_major}
|
|
# ln -sf libcholmod.so.%{cholmod_version} libcholmod.so
|
|
#popd
|
|
|
|
%define colamd_version 2.4
|
|
%define colamd_version_major 2
|
|
pushd COLAMD
|
|
make -f Makefile CFLAGS="$RPM_OPT_FLAGS -fPIC" library
|
|
gcc -shared -Wl,-soname,libcolamd.so.%{colamd_version_major} -o libcolamd.so.%{colamd_version} `ls *.o`
|
|
cp *.a *.so* ../Lib
|
|
cp *.h ../Include
|
|
mkdir ../Doc/COLAMD/
|
|
cp README.txt ChangeLog ../Doc/COLAMD
|
|
popd
|
|
pushd Lib
|
|
ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}
|
|
ln -sf libcolamd.so.%{colamd_version} libcolamd.so
|
|
popd
|
|
|
|
%define ldl_version 1.2
|
|
%define ldl_version_major 1
|
|
pushd LDL
|
|
make -f Makefile CFLAGS="$RPM_OPT_FLAGS -fPIC" libldl.a
|
|
gcc -shared -Wl,-soname,libldl.so.%{ldl_version_major} -o libldl.so.%{ldl_version} `ls *.o`
|
|
cp *.a *.so* ../Lib
|
|
cp *.h ../Include
|
|
mkdir ../Doc/LDL/
|
|
cp README.txt ChangeLog lesser.txt ../Doc/LDL/
|
|
mkdir ../Devel/LDL/
|
|
cp *.pdf *.ps ../Devel/LDL/
|
|
popd
|
|
pushd Lib
|
|
ln -sf libldl.so.%{ldl_version} libldl.so.%{ldl_version_major}
|
|
ln -sf libldl.so.%{ldl_version} libldl.so
|
|
popd
|
|
|
|
%define umfpack_version 4.5
|
|
%define umfpack_version_major 4
|
|
pushd UMFPACK
|
|
pushd Source
|
|
make -f Makefile CFLAGS="$RPM_OPT_FLAGS -fPIC"
|
|
gcc -shared -Wl,-soname,libumfpack.so.%{umfpack_version_major} -o ../Lib/libumfpack.so.%{umfpack_version} `ls *.o` -lblas -lm
|
|
popd
|
|
cp Lib/*.a Lib/*.so* ../Lib
|
|
cp Include/*.h ../Include
|
|
mkdir ../Doc/UMFPACK
|
|
cp Doc/License Doc/ChangeLog Doc/lesser.txt README.txt ../Doc/UMFPACK
|
|
mkdir ../Devel/UMFPACK/
|
|
cp Doc/*.pdf ../Devel/UMFPACK/
|
|
popd
|
|
pushd Lib
|
|
ln -sf libumfpack.so.%{umfpack_version} libumfpack.so.%{umfpack_version_major}
|
|
ln -sf libumfpack.so.%{umfpack_version} libumfpack.so
|
|
popd
|
|
|
|
|
|
%install
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
|
|
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}/%{name}
|
|
pushd Lib
|
|
for f in *.a *.so*; do
|
|
cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f
|
|
done
|
|
popd
|
|
pushd Include
|
|
for f in *.h; do
|
|
cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f
|
|
done
|
|
popd
|
|
|
|
|
|
%clean
|
|
rm -rf ${RPM_BUILD_ROOT}
|
|
|
|
%post -p /sbin/ldconfig
|
|
|
|
%postun -p /sbin/ldconfig
|
|
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc Doc/*
|
|
%{_libdir}/lib*.so.*
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%doc Devel/*
|
|
%{_includedir}/%{name}
|
|
%{_libdir}/lib*.a
|
|
%{_libdir}/lib*.so
|
|
|
|
%changelog
|
|
* Sat Oct 01 2005 Quentin Spencer <qspencer@users.sourceforge.net> 0.9-2
|
|
- Modify description, other modifications for import into FE.
|
|
- Add dist tag, cosmetic changes.
|
|
|
|
* Tue Sep 08 2005 David Bateman <dbateman@free.fr> 0.9-1
|
|
- First version.
|