debian swirl logo

Back to the packages list suitesparse

#!/usr/bin/make -f

include /usr/share/cdbs/1/class/makefile.mk
include /usr/share/cdbs/1/rules/debhelper.mk

DEB_AUTO_CLEANUP_RCS	:= yes
DEB_SRCDIR 		:= $(CURDIR)/
DEB_BUILDDIR 		:= $(DEB_SRCDIR)/

DEB_MAKE_CLEAN_TARGET    := clean
DEB_MAKE_BUILD_TARGET    := default
DEB_COMPRESS_EXCLUDE_ALL := .pdf

# List of libraries provided by SuiteSparse
LIBRARIES = AMD CAMD BTF COLAMD CCOLAMD CHOLMOD CSparse CXSparse KLU LDL UMFPACK SPQR
# Generate variables like "AMD = libamd"
$(foreach lib, $(LIBRARIES), $(eval $(lib) = $(shell perl debian/library-soname.pl $(lib))))
# Lists of lib*.install files
INSTALL_FILES = $(foreach lib, $(LIBRARIES), debian/$($(lib)).install)

# Rule for regenerating debian/control from debian/control.in
# Note that this should not be automatized, see http://ftp-master.debian.org/REJECT-FAQ.html
generate-debian-control: debian/control.in debian/library-soname.pl
		sed "$(foreach lib, $(LIBRARIES), s/@$(lib)@/$($(lib))/g;)" < debian/control.in > debian/control
.PHONY: generate-debian-control

# Generate rules for debian/lib*.install
$(foreach lib, $(LIBRARIES), $(eval debian/$($(lib)).%: debian/%/$(lib) ; cp $$< $$@))

makebuilddir:: $(INSTALL_FILES) debian/control

common-build-arch::
		-( cd AMD/Doc      && mv ChangeLog AMD_ChangeLog )
		-( cd CAMD/Doc     && mv ChangeLog CAMD_ChangeLog )
		-( cd CCOLAMD/Doc  && mv ChangeLog CCOLAMD_ChangeLog )
		-( cd COLAMD/Doc   && mv ChangeLog COLAMD_ChangeLog )
		-( cd BTF/Doc      && mv ChangeLog BTF_ChangeLog )
		-( cd KLU/Doc      && mv ChangeLog KLU_ChangeLog )
		-( cd LDL/Doc      && mv ChangeLog LDL_ChangeLog )
		-( cd UMFPACK/Doc  && mv ChangeLog UMFPACK_ChangeLog )
		-( cd CHOLMOD/Doc  && mv ChangeLog CHOLMOD_ChangeLog )
		-( cd CSparse/Doc  && mv ChangeLog CSparse_ChangeLog )
		-( cd CXSparse/Doc && mv ChangeLog CXSparse_ChangeLog )
		-( cd SPQR/Doc     && mv ChangeLog SPQR_ChangeLog )

build/libsuitesparse-doc::
		-( cd CHOLMOD/Doc && mv UserGuide.pdf CHOLMOD_UserGuide.pdf && mv UserGuide.bib CHOLMOD_UserGuide.bib )
		-( cd UMFPACK/Doc && mv UserGuide.pdf UMFPACK_UserGuide.pdf && mv UserGuide.bib UMFPACK_UserGuide.bib )
		-( cd UMFPACK/Doc && mv QuickStart.pdf UMFPACK_QuickStart.pdf )

cleanbuilddir::
		-( cd AMD/Doc      && mv AMD_ChangeLog ChangeLog )
		-( cd CAMD/Doc     && mv CAMD_ChangeLog ChangeLog )
		-( cd CCOLAMD/Doc  && mv CCOLAMD_ChangeLog ChangeLog )
		-( cd COLAMD/Doc   && mv COLAMD_ChangeLog ChangeLog )
		-( cd BTF/Doc      && mv BTF_ChangeLog ChangeLog )
		-( cd KLU/Doc      && mv KLU_ChangeLog ChangeLog )
		-( cd LDL/Doc      && mv LDL_ChangeLog ChangeLog )
		-( cd UMFPACK/Doc  && mv UMFPACK_ChangeLog ChangeLog )
		-( cd CHOLMOD/Doc  && mv CHOLMOD_ChangeLog ChangeLog )
		-( cd CSparse/Doc  && mv CSparse_ChangeLog ChangeLog )
		-( cd CXSparse/Doc && mv CXSparse_ChangeLog ChangeLog )
		-( cd SPQR/Doc     && mv SPQR_ChangeLog ChangeLog )

cleanbuilddir/libsuitesparse-doc::
		-( cd CHOLMOD/Doc && mv CHOLMOD_UserGuide.pdf UserGuide.pdf && mv CHOLMOD_UserGuide.bib UserGuide.bib )
		-( cd UMFPACK/Doc && mv UMFPACK_UserGuide.pdf UserGuide.pdf && mv UMFPACK_UserGuide.bib UserGuide.bib )
		-( cd UMFPACK/Doc && mv UMFPACK_QuickStart.pdf QuickStart.pdf )

clean::
		-make purge
		-find $(DEB_BUILDDIR) -name "*.a" | xargs rm
		-find $(DEB_BUILDDIR) -name "*.so*" | xargs rm
		-find $(DEB_BUILDDIR) -name "*.oo" | xargs rm
		rm -f $(INSTALL_FILES)

get-orig-source:
		uscan --force-download --rename --destdir .
.PHONY: get-orig-source

Builds:

libamd2.3.1
approximate minimum degree ordering library for sparse matrices
libbtf1.2.0
permutation to block triangular form library for sparse matrices
libcamd2.3.1
symmetric approximate minimum degree library for sparse matrices
libccolamd2.8.0
constrained column approximate library for sparse matrices
libcholmod2.1.2
sparse cholesky factorization library for sparse matrices
libcolamd2.8.0
column approximate minimum degree ordering library for sparse matrices
libcsparse3.1.2
concise sparse matrix library
libcxsparse3.1.2
concise sparse matrix library (complex, int and long int support)
libklu1.2.1
circuit simulation sparse lu factorization library
libldl2.1.0
simple ldl' factorization library for sparse matrices
libspqr1.3.1
sparse qr factorization library
libsuitesparse-dbg
libraries for sparse matrices computations (debugging symbols)
libsuitesparse-dev
libraries for sparse matrices computations (development files)
libsuitesparse-doc
libraries for sparse matrices computations (documentation)
libumfpack5.6.2
sparse lu factorization library