File: rules

package info (click to toggle)
getdp 3.5.0%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,748 kB
  • sloc: cpp: 71,740; fortran: 13,955; yacc: 9,666; f90: 1,640; lex: 813; makefile: 55; ansic: 34; awk: 33; sh: 23
file content (39 lines) | stat: -rwxr-xr-x 1,730 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
#!/usr/bin/make -f

BUILDDIR_PETSC = $(CURDIR)/debian/build/petsc
BUILDDIR_SPARSKIT = $(CURDIR)/debian/build/sparskit

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_CXXFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

export PRTE_MCA_plm_ssh_agent=/bin/false                #workaround to start MPI-applications in chroot

%:
	dh $@

GETDP_CONFIGURE_COMMON =    -DENABLE_MPI:BOOL=ON \
			    -DCMAKE_SKIP_RPATH:BOOL=ON \
			    -DBLAS_LAPACK=ON -DBLAS_LAPACK_LIBRARIES="-llapack -lblas"

override_dh_auto_configure:
	dh_auto_configure --builddirectory=$(BUILDDIR_PETSC) -O--parallel    -- $(GETDP_CONFIGURE_COMMON) -DENABLE_PETSC=1 -DENABLE_SPARSKIT=0
	dh_auto_configure --builddirectory=$(BUILDDIR_SPARSKIT) -O--parallel -- $(GETDP_CONFIGURE_COMMON) -DENABLE_PETSC=0 -DENABLE_SPARSKIT=1
	sed -i 's/-lpthread/-lgfortran -lpthread/' debian/build/*/CMakeFiles/getdp.dir/link.txt

override_dh_auto_build:
	dh_auto_build -O--parallel --builddirectory=$(BUILDDIR_PETSC)
	dh_auto_build -O--parallel --builddirectory=$(BUILDDIR_SPARSKIT)
	mv $(BUILDDIR_SPARSKIT)/getdp $(BUILDDIR_SPARSKIT)/getdp-sparskit
	cd debian/build/petsc && make doc

override_dh_auto_install:
	dh_auto_install -O--parallel --builddirectory=$(BUILDDIR_PETSC)
	tar xzf debian/build/petsc/getdp*-doc.tgz -C debian/tmp/usr/share/doc/getdp/
	sed "s|image src=\"|image src=\"/usr/share/doc/getdp/html/|" -i debian/tmp/usr/share/doc/getdp/doc/texinfo/getdp.info
	sed "s|href=\"http://getdp.info/getdp.css|href=\"getdp.css|" -i debian/tmp/usr/share/doc/getdp/doc/texinfo/getdp.html

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILDDIR_PETSC) $(BUILDDIR_SPARSKIT)