File: rules

package info (click to toggle)
med-fichier 4.0.0%2Brepack-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 55,660 kB
  • sloc: cpp: 679,525; ansic: 72,977; python: 37,983; fortran: 12,925; sh: 6,821; f90: 5,531; makefile: 5,136; tcl: 216; xml: 173
file content (54 lines) | stat: -rwxr-xr-x 2,156 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
#!/usr/bin/make -f
%:
	dh $@ --with python2,python3

# Which MPI implementation?
# set ARCH_DEFAULT_MPI_IMPL
include /usr/share/mpi-default-dev/debian_defaults

export OMPI_MCA_orte_rsh_agent=/bin/false                #workaround to start MPI-applications in chroot
export DEB_CPPFLAGS_MAINT_APPEND := -I/usr/include/$(ARCH_DEFAULT_MPI_IMPL) -DOMPI_SKIP_MPICXX=1 -DMPICH_SKIP_MPICXX=1
export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

CONFIGURE_FLAGS = --enable-python --with-swig=yes --with-hdf5=/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL) --with-hdf5-bin=/usr/bin

override_dh_auto_clean:
	[ ! -f doc/html.dox/Makefile ] || make -C doc/html.dox maintainer-clean-local
	dh_auto_clean
	rm -fr build.* debian/tmp.*
	[ ! -f doc/dox/examples.dox.orig ] || mv doc/dox/examples.dox.orig doc/dox/examples.dox

override_dh_auto_configure:
	cp doc/dox/examples.dox doc/dox/examples.dox.orig
	PYTHON=/usr/bin/python dh_auto_configure -Bbuild.python2 -- $(CONFIGURE_FLAGS)
	PYTHON=/usr/bin/python3 dh_auto_configure -Bbuild.python3 -- $(CONFIGURE_FLAGS)

override_dh_auto_build-arch:
	dh_auto_build -Bbuild.python2
	dh_auto_build -Bbuild.python3

override_dh_auto_build-indep:
	dh_auto_build -Bbuild.python2/doc/html.dox -- html-local

override_dh_auto_install-arch:
	dh_auto_install -Bbuild.python2
	dh_auto_install -Bbuild.python3 --destdir=debian/tmp.python3
	mv debian/tmp.python3/usr/lib/python* debian/tmp/usr/lib/python3
	mv debian/tmp/usr/lib/python3/site-packages debian/tmp/usr/lib/python3/dist-packages
	find debian/tmp/usr/lib/python* \( -name \*.py[co] -o -name \*.la \) -delete
	rm -rf debian/tmp/usr/bin/test* \
	       debian/tmp/usr/bin/usescases \
	       debian/tmp/usr/bin/unittests

override_dh_auto_install-indep:
	dh_auto_install -Bbuild.python2/doc/html.dox

override_dh_install:
	dh_install
	rm -f debian/libmedc-dev/usr/include/*import*

override_dh_auto_test-arch:
	MPIEXEC="mpiexec --allow-run-as-root --oversubscribe -np " dh_auto_test -Bbuild.python2 --max-parallel=1
	MPIEXEC="mpiexec --allow-run-as-root --oversubscribe -np " dh_auto_test -Bbuild.python3/tests/python --max-parallel=1

override_dh_auto_test-indep: