File: rules

package info (click to toggle)
sundials 3.1.2%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,476 kB
  • sloc: ansic: 131,934; fortran: 4,977; f90: 1,482; cpp: 1,229; python: 645; makefile: 52; sh: 49
file content (78 lines) | stat: -rwxr-xr-x 2,171 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow

include /usr/share/dpkg/architecture.mk

extra_flags += \
	-DCMAKE_Fortran_COMPILER=gfortran \
	-DBUILD_SHARED_LIBS:BOOL=ON \
	-DBUILD_STATIC_LIBS:BOOL=ON \
	-DFCMIX_ENABLE:BOOL=ON \
	-DMPI_ENABLE:BOOL=ON \
	\
	-DSUNDIALS_INDEX_TYPE=int32_t \
	-DLAPACK_ENABLE:BOOL=ON \
	\
	-DEXAMPLES_ENABLE_C:BOOL=ON \
	-DEXAMPLES_ENABLE_CXX:BOOL=ON \
	-DEXAMPLES_ENABLE_F77:BOOL=ON \
	-DEXAMPLES_INSTALL:BOOL=ON \
	\
	-DOPENMP_ENABLE:BOOL=ON \
	-DPTHREAD_ENABLE:BOOL=ON \
	\
	-DKLU_ENABLE:BOOL=ON \
	-DKLU_INCLUDE_DIR=/usr/include/suitesparse \
	-DKLU_LIBRARY_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
	\
	-DPETSC_ENABLE:BOOL=ON \
	\
	-DHYPRE_ENABLE:BOOL=ON \
	-DHYPRE_INCLUDE_DIR=/usr/include/hypre \
	-DHYPRE_LIBRARY=-lHYPRE_core



# Debian doesn't ship superlu-mt currently, so I turn off this support
extra_flags += -DSUPERLUMT_ENABLE:BOOL=OFF


BUILDDIR = $(CURDIR)/debian/build


%:
	dh $@ --buildsystem=cmake  --builddirectory=$(BUILDDIR)

override_dh_auto_configure:
	dh_auto_configure -- $(extra_flags)

# Hack from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839387
# The OpenMPI variable prevents FTBFS when there are not enough CPUs (see #910352 and #849974)
override_dh_auto_test:
	$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),true,(cd debian/build; OMPI_MCA_rmaps_base_oversubscribe=1 ../nofakeroot ctest))

override_dh_auto_install:
	dh_auto_install
# I strip out all the RPATH/RUNPATH tags from my shared objects. These all point
# to libraries that actually live in standard locations, so the tags are not
# needed
	find debian/tmp/ -name '*.so' -o -name '*.so.*' -exec chrpath -d '{}' \;

# Strip extra license file
	rm debian/tmp/usr/include/sundials/LICENSE

# We copy READMEs by hand because they need to be renamed
override_dh_installdocs:
	dh_installdocs
	mkdir -p debian/libsundials-dev/usr/share/doc/libsundials-dev
	for module in arkode cvode cvodes ida idas kinsol; do \
		cp src/$${module}/README debian/libsundials-dev/usr/share/doc/libsundials-dev/README.$${module}; \
	done

override_dh_compress:
	dh_compress -Xexamples/

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILDDIR)