include ../../SuiteSparse_config/SuiteSparse_config.mk
# AMD depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# BTF depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
ccode: all
include ../../SuiteSparse_config/SuiteSparse_config.mk
# CAMD depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# CCOLAMD depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
# CHOLMOD depends on AMD, SuiteSparse_config, LAPACK, BLAS,
# and optionally METIS, CAMD, and CCOLAMD if the Partition Module is in use
-LDLIBS += -lamd -lcolamd -lsuitesparseconfig \
+LDLIBS += -L../../lib -lamd -lcolamd -lsuitesparseconfig \
$(LIB_WITH_PARTITION) $(LAPACK) $(BLAS)
SO_OPTS += $(CFOPENMP)
# default LAPACK and BLAS from SuiteSparse_config.mk:
LDLIBS = -L../../lib \
- -lmetis -lm $(LAPACK) $(BLAS) -lrt -Wl,-rpath=$(SUITESPARSE)/lib
+ -lmetis -lm $(LAPACK) $(BLAS) -lrt -Wl,-rpath=$(RUNPATH)
# LAPACK and the Fortran reference BLAS, compiled with gfortran -g -O:
# LDLIBS = $(METIS) -lm -llapack_plain -lblas_plain -lg2c
include ../../SuiteSparse_config/SuiteSparse_config.mk
# COLAMD depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# CXSparse depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# CXSparse depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# GPUQREngine depends on SuiteSparse_config, CUDA, and SuiteSparse_GPURuntime
-LDLIBS += -lSuiteSparse_GPURuntime -lsuitesparseconfig $(CUDART_LIB)
+LDLIBS += -L../../lib -lSuiteSparse_GPURuntime -lsuitesparseconfig $(CUDART_LIB)
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# KLU depends on BTF, AMD, COLAMD, and SuiteSparse_config
-LDLIBS += -lamd -lcolamd -lbtf -lsuitesparseconfig
+LDLIBS += -L../../lib -lamd -lcolamd -lbtf -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
LDLIBS = -L../../lib -lamd -lcolamd -lcholmod -lcamd -lccolamd \
-lmetis -lsuitesparseconfig \
$(LAPACK) $(BLAS) $(CUDART_LIB) $(CUBLAS_LIB) -lm -lrt \
- -Wl,-rpath=$(SUITESPARSE)/lib -lstdc++
+ -Wl,-rpath=$(RUNPATH) -lstdc++
I = -I../../include -I../Include -I../User -I../../BTF/Include
include ../../SuiteSparse_config/SuiteSparse_config.mk
# LDL depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
@mkdir -p $(INSTALL_LIB)
@mkdir -p $(INSTALL_INCLUDE)
@mkdir -p $(INSTALL_DOC)
- - $(CP) lib/libmetis.* $(INSTALL_LIB)
- - $(CP) metis-5.1.0/manual/manual.pdf $(INSTALL_DOC)/METIS_manual.pdf
- - $(CP) metis-5.1.0/README.txt $(INSTALL_DOC)/METIS_README.txt
+ - $(CP) -f lib/libmetis.* $(INSTALL_LIB)
+ - $(CP) -f metis-5.1.0/manual/manual.pdf $(INSTALL_DOC)/METIS_manual.pdf
+ - $(CP) -f metis-5.1.0/README.txt $(INSTALL_DOC)/METIS_README.txt
# the following is needed only on the Mac, so *.dylib is hardcoded:
$(SO_INSTALL_NAME) $(INSTALL_LIB)/libmetis.dylib $(INSTALL_LIB)/libmetis.dylib
- $(CP) include/metis.h $(INSTALL_INCLUDE)
include ../../SuiteSparse_config/SuiteSparse_config.mk
# RBio depends on SuiteSparse_config
-LDLIBS += -lsuitesparseconfig
+LDLIBS += -L../../lib -lsuitesparseconfig
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# SPQR depends on CHOLMOD, AMD, COLAMD, LAPACK, the BLAS and SuiteSparse_config
-LDLIBS += -lamd -lcolamd -lcholmod -lsuitesparseconfig $(LAPACK) $(BLAS) $(TBB)
+LDLIBS += -L../../lib -lamd -lcolamd -lcholmod -lsuitesparseconfig $(LAPACK) $(BLAS) $(TBB)
# compile and install in SuiteSparse/lib
library:
include ../../SuiteSparse_config/SuiteSparse_config.mk
# SuiteSparse_GPURuntime depends on SuiteSparse_config and CUDA
-LDLIBS += -lsuitesparseconfig $(CUDART_LIB)
+LDLIBS += -L../../lib -lsuitesparseconfig $(CUDART_LIB)
# compile and install in SuiteSparse/lib
library:
ifeq ($(UNAME),Linux)
# add the realtime library, librt, and SuiteSparse/lib
- LDLIBS += -lrt -Wl,-rpath=$(INSTALL_LIB)
+ LDLIBS += -lrt -Wl,-rpath=$(RUNPATH)
endif
#---------------------------------------------------------------------------
# UMFPACK depends on AMD, SuiteSparse_config, LAPACK, and the BLAS.
# It optionally relies on CHOLMOD
-LDLIBS += -lamd -lsuitesparseconfig $(LAPACK) $(BLAS)
+LDLIBS += -L../../lib -lamd -lsuitesparseconfig $(LAPACK) $(BLAS)
# compile and install in SuiteSparse/lib
library:
LDFLAGS = --coverage
UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib $(LIB2) -lgcov
+ -Wl,-rpath=$(RUNPATH) $(LIB2) -lgcov
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
LDFLAGS = --coverage
UMFPACK_CONFIG = -DTESTING
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib -lgcov
+ -Wl,-rpath=$(RUNPATH) -lgcov
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
CF = -O3 -fPIC -fopenmp
UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib
+ -Wl,-rpath=$(RUNPATH)
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
CF = -O3 -fPIC -fopenmp
UMFPACK_CONFIG = -DTESTING
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib
+ -Wl,-rpath=$(RUNPATH)
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
LDFLAGS = --coverage
UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING -DNRECIPROCAL
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib -lgcov
+ -Wl,-rpath=$(RUNPATH) -lgcov
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
LDFLAGS = --coverage
UMFPACK_CONFIG = -DTESTING -DNTIMER
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib -lgcov
+ -Wl,-rpath=$(RUNPATH) -lgcov
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
LDFLAGS = --coverage
UMFPACK_CONFIG = -DNBLAS -DTEST_FOR_INTEGER_OVERFLOW -DTESTING -DNO_DIVIDE_BY_ZERO
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib -lgcov
+ -Wl,-rpath=$(RUNPATH) -lgcov
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
LDFLAGS = --coverage
UMFPACK_CONFIG = -DTESTING -DNO_DIVIDE_BY_ZERO
LDLIBS = -L$(INSTALL)/lib -llapack -lrefblas -lgfortran -lm -lrt \
- -Wl,-rpath=lib -lgcov
+ -Wl,-rpath=$(RUNPATH) -lgcov
ifneq ($(CUDA),no)
CUDA_PATH = $(shell which nvcc 2>/dev/null | sed "s/\/bin\/nvcc//")
-Name: suitesparse
-Summary: %{name}
-Version: 5.2.0
+Name: suitesparse
+Summary: A collection of sparse matrix libraries
+Version: 5.2.0
Release: 0
# ==========================================================
-License: Apache-2.0
+License: GPL2.0+ AND LGPL2.1+
# ==========================================================
-Group: Development/ROS
+Group: Development/Libraries/C and C++
Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
# specifies build-time dependencies for the package
# ==========================================================
BuildRequires: cmake
+BuildRequires: lapack-devel
+BuildRequires: openblas-devel
%description
%{name} version %{version}
+%package devel
+Summary: A collection of sparse matrix libraries
+
+%description devel
+%{name}-devel version %{version}
%prep
%setup -q
# how to actually build the software we are packaging
# ==========================================================
%build
+%{make_build} library
# ==========================================================
# how to actually build the software we are packaging
# ==========================================================
%install
+mkdir -p %{buildroot}%{_libdir}
+mkdir -p %{buildroot}%{_includedir}
+mkdir -p %{buildroot}%{_datadir}/doc
+
+INSTALL_LIB=%{buildroot}%{_libdir} \
+INSTALL_INCLUDE=%{buildroot}%{_includedir} \
+INSTALL_DOC=%{buildroot}%{_datadir}/doc \
+RUNPATH=%{_libdir} \
+%{__make} install
+
+%remove_docs
-%clean
+%clean
%post -p /sbin/ldconfig
# ==========================================================
# files section
-# The list of files that will be installed in the end
+# The list of files that will be installed in the end
# user’s system.
# ==========================================================
%files
%manifest %{name}.manifest
+%{_libdir}/libmetis.so
+%{_libdir}/*.so.*
+
+%files devel
+%manifest %{name}.manifest
+%{_includedir}/*.h
+%{_includedir}/*.hpp
+%exclude %{_libdir}/libmetis.so
+%{_libdir}/*.so