File: rules

package info (click to toggle)
meep 1.29.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 79,676 kB
  • sloc: cpp: 32,541; python: 31,061; javascript: 9,819; lisp: 1,225; makefile: 519; sh: 249; ansic: 131
file content (86 lines) | stat: -rwxr-xr-x 2,979 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
79
80
81
82
83
84
85
86
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1
#export DEB_BUILD_OPTIONS=nocheck

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)
arch = $(shell dpkg-architecture -qDEB_BUILD_ARCH)

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
  export DEB_CPPFLAGS_MAINT_APPEND := -I/usr/include/hdf5/serial
  export DEB_LDFLAGS_MAINT_APPEND := -Wl,-L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
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 \
	--enable-maintainer-mode

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	# the latest patch is only needed on architectures without SSE or other special stuff
	if [ "${arch}" = "i386" ] || \
	   [ "${arch}" = "hurd-i386" ] ; then \
	  echo "all patches needed, do nothing here";  \
	else \
	  echo "we don't need the last patch";  \
	  quilt pop; \
	fi
	F77=gfortran dh_auto_configure -- $(CONFIGURE_FLAGS)

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

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	echo ${arch}
	if [ "${arch}" = "armel" ] || \
	   [ "${arch}" = "riscv64" ] || \
	   [ "${arch}" = "hurd-i386" ] ; 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 python/test-suite.log
endif

override_dh_auto_install:
	dh_installchangelogs NEWS.md
	dh_auto_install
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/adjoint/*.pyc
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/adjoint/*.pyo
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/*.pyc
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/*.pyo
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/*.a
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/*.la
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/mpb/*.pyc
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/mpb/*.pyo
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/mpb/*.a
	$(RM) -f debian/tmp/usr/lib/python*/site-packages/meep/mpb/*.la
	$(RM) -f debian/tmp/usr/lib/*/libpympb.la
	$(RM) -f debian/tmp/usr/lib/*/libmeep.la
	$(RM) -rf debian/tmp/usr/lib/python*/site-packages/meep/__pycache__/
	$(RM) -rf debian/tmp/usr/lib/python*/site-packages/meep/adjoint/__pycache__/
	$(RM) -rf debian/tmp/usr/lib/python*/site-packages/meep/mpb/__pycache__/

override_dh_shlibdeps:
	dh_shlibdeps
	dh_numpy3