File: rules

package info (click to toggle)
esys-particle 2.3.5%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 13,132 kB
  • sloc: cpp: 81,480; python: 5,872; makefile: 1,259; sh: 313; perl: 225
file content (55 lines) | stat: -rwxr-xr-x 2,139 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
#!/usr/bin/make -f


PY3VER := $(shell py3versions -d -v | tr -d .)
export PYTHON = $(shell py3versions -d)

# less debug info to avoid running out of address space
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
  export DEB_CXXFLAGS_MAINT_APPEND += -g1
endif

include /usr/share/dpkg/default.mk

%:
	dh $@ --with python3

export OMPI_MCA_plm_rsh_agent=/bin/false                #workaround to start MPI-applications in chroot
disable_auto_test_archs_mpi = hurd-i386 mips mipsel s390 s390x ia64

export LD_LIBRARY_PATH :=  $(CURDIR)/debian/esys-particle/usr/lib/${DEB_HOST_MULTIARCH}/:$(CURDIR)/debian/esys-particle/usr/lib/python3/dist-packages/esys/lsm/util/:$(CURDIR)/debian/esys-particle/usr/lib/python3/dist-packages/esys/lsm/:$(LD_LIBRARY_PATH);

export PYTHONPATH := $(CURDIR)/debian/esys-particle/usr/lib/python3/dist-packages/:$(PYTHONPATH);

export NO_PNG_PKG_MANGLE := 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CFLAGS := -Wall $(shell dpkg-buildflags --get CFLAGS)
CXXFLAGS := -Wall $(shell dpkg-buildflags --get CXXFLAGS)
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
LDFLAGS := -lboost_system $(shell pkg-config --libs python3) $(shell dpkg-buildflags --get LDFLAGS)

extra_flags += CC=mpicc CXX=mpicxx CFLAGS='$(CFLAGS)' CXXFLAGS='$(CXXFLAGS)' CPPFLAGS='$(CPPFLAGS)'\
 LDFLAGS='$(LDFLAGS)' --with-vtk --with-latex --enable-vtk

override_dh_auto_configure:
	dh_auto_configure -- $(extra_flags) --with-boost-libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --with-boost-python='boost_python$(PY3VER)'

override_dh_auto_build:
	dh_auto_build
	doxygen

override_dh_auto_install:
	dh_auto_install
ifeq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs_mpi)))
	cd $(CURDIR)/debian/test; python3 box.py 15.0
#cd $(CURDIR)/debian/test; mpirun --allow-run-as-root -np 3 $(CURDIR)/debian/esys-particle/usr/bin/esysparticle compression.py; cat nbons.dat; cat ekin.dat; cat epot.dat
endif
	find debian -name '*.pyc' -delete
	find debian -name '*.pyo' -delete
	find debian -name '*.la' -delete
	find debian -type d -name __pycache__ -exec rm -rf {} +

override_dh_installdocs:
	dh_installdocs
	find debian -name '*.md5' -delete