File: rules

package info (click to toggle)
meep-mpi-default 1.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 25,820 kB
  • sloc: cpp: 27,370; python: 10,574; lisp: 1,213; makefile: 438; sh: 28
file content (72 lines) | stat: -rwxr-xr-x 2,390 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This has to be exported to make some magic below work.
#export DH_OPTIONS

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

install_file    = /usr/bin/install -p -o root -g root -m 644
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

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

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)/libhdf5.so),)
  export DEB_CPPFLAGS_MAINT_APPEND := -I/usr/include/hdf5/$(ARCH_DEFAULT_MPI_IMPL)
  export DEB_LDFLAGS_MAINT_APPEND := -Wl,-L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/$(ARCH_DEFAULT_MPI_IMPL)
endif

CONFIGURE_FLAGS = --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
	--prefix=/usr --mandir=\$${prefix}/share/man \
	--infodir=\$${prefix}/share/info \
	--with-libctl=/usr/share/libctl \
	--with-gcc-arch=no \
	--enable-shared --with-pic --enable-cxx \
	--with-mpi=yes \
	--enable-maintainer-mode

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	F77=gfortran dh_auto_configure -- $(CONFIGURE_FLAGS)

override_dh_auto_install:
	dh_installchangelogs NEWS.md
	dh_auto_install
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/*.pyc
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/*.pyo
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/*.a
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/*.la
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/mpb/*.pyc
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/mpb/*.pyo
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/mpb/*.a
	$(RM) debian/tmp/usr/lib/python2.7/dist-packages/meep/mpb/*.la

override_dh_clean:
	# we do not need this anymore
	rm -f tests/latest_output
	dh_clean

override_dh_auto_test:
	echo ${arch}
	#if [ "${arch}" = "armel" ] || \
	#   [ "${arch}" = "mips" ] || \
	#   [ "${arch}" = "mipsel" ] || \
	#   [ "${arch}" = "powerpc" ] || \
	#   [ "${arch}" = "sparc" ] ; then \
	#  echo "Do not make tests on this architecture" ;\
	#else \
	#  echo "Do make tests on this architecture" ;\
	#  make check; \
	#  find; \
	#  cat python/test-suite.log; \
	#fi
	# check whether testsuite runs everywhere
	make check; \
	cat tests/test-suite.log
#	cat python/test-suite.log