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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149
|
#!/usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
PY3VER_DEFAULT := $(shell py3versions -dv)
export PRTE_MCA_rmaps_default_mapping_policy=:oversubscribe
export OMPI_MCA_plm_rsh_agent=/bin/false #workaround to start MPI-applications in chroot
disable_auto_test_archs_mpi = hurd-i386 mips mipsel mips64el s390 s390x i386 armhf armel
disable_auto_test_archs_simpl = mips64el
%:
dh $@ --with python3,sphinxdoc --sourcedirectory=cmake --builddirectory=$(BUILDDIR)
override_dh_auto_configure:
dh_auto_configure -- \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_SKIP_INSTALL_RPATH=TRUE \
-DPKG_ASPHERE=ON \
-DPKG_ATC=ON \
-DPKG_AWPMD=ON \
-DPKG_BOCS=ON \
-DPKG_BODY=ON \
-DPKG_CG-DNA=ON \
-DPKG_CG-SPICA=ON \
-DPKG_CLASS2=ON \
-DPKG_COLLOID=ON \
-DPKG_COMPRESS=ON \
-DPKG_CORESHELL=ON \
-DPKG_EXTRA-PAIR=ON \
-DPKG_DIELECTRIC=ON \
-DPKG_DIFFRACTION=ON \
-DPKG_DIPOLE=ON \
-DPKG_DPD-BASIC=ON \
-DPKG_DRUDE=ON \
-DPKG_EFF=ON \
-DPKG_ELECTRODE=ON \
-DUSE_INTERNAL_LINALG=no \
-DPKG_FEP=ON \
-DPKG_GPU=OFF \
-DPKG_GRANULAR=ON \
-DPKG_H5MD=ON \
-DPKG_KIM=ON \
-DPKG_KSPACE=ON \
-DPKG_LATBOLTZ=ON \
-DPKG_MANIFOLD=ON \
-DPKG_MANYBODY=ON \
-DPKG_MC=ON \
-DPKG_MEAM=ON \
-DPKG_MGPT=ON \
-DPKG_MISC=ON \
-DPKG_MOFFF=ON \
-DPKG_MOLFILE=ON \
-DPKG_MPIIO=ON \
-DPKG_MOLECULE=ON \
-DPKG_NETCDF=ON \
-DPKG_OPENMP==ON \
-DPKG_OPT=ON \
-DPKG_ORIENT=ON \
-DPKG_PERI=ON \
-DPKG_PHONON=ON \
-DPKG_POEMS=ON \
-DPKG_PYTHON=ON \
-DPKG_QEQ=ON \
-DPKG_QTB=ON \
-DPKG_REAXFF=OFF \
-DPKG_REPLICA=ON \
-DPKG_RIGID=ON \
-DPKG_SHOCK=ON \
-DPKG_SMTBQ=ON \
-DPKG_SNAP=ON \
-DPKG_SPH=ON \
-DPKG_SRD=ON \
-DPKG_TALLY=ON \
-DPKG_UEF=ON \
-DPKG_VTK=ON \
-DPKG_VORONOI=ON
# Oversubscribe procs on OpenMPI for testing
export OMPI_MCA_rmaps_base_oversubscribe=1
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
execute_after_dh_auto_build-indep: export http_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep: export https_proxy=127.0.0.1:9
execute_after_dh_auto_build-indep:
$(MAKE) -C doc html
endif
execute_after_dh_auto_clean:
rm -rf $(BUILDDIR)
rm -rf .pybuild
rm -rf python/build
rm -rf python/lammps.egg-info
rm -f python/examples/log.lammps
if [ -d doc/html.orig ]; then \
rm -rf doc/html; \
mv doc/html.orig doc/html; \
fi
rm -rf doc/docenv doc/doctrees doc/utils/sphinx-config/conf.py
rm -rf doc/doxygen/xml doc/doxygen-warn.log doc/doxygen/Doxyfile
override_dh_auto_install-indep:
execute_after_dh_auto_install-arch:
LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
CMAKE_PREFIX_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/cmake \
pybuild --dir=$(CURDIR)/python --system=pyproject --name=lammps
override_dh_installman-arch:
sed -i 's|TH LAMMPS|TH LAMMPS \"1\"|g' $(CURDIR)/debian/tmp/usr/share/man/man1/lmp.1
dh_installman -a
override_dh_installexamples:
dh_installexamples -X.gitignore
execute_after_dh_fixperms-indep:
find $(CURDIR)/debian/lammps-examples/usr/share/lammps/examples/ -type f -a -not -name *.sh -print -exec chmod 644 {} \;
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test-arch:
ifeq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs_simpl)))
mkdir test; cp examples/crack/* test/
cd test; $(BUILDDIR)/lmp < in.crack
rm -rf test
endif
ifeq (,$(filter $(DEB_HOST_ARCH),$(disable_auto_test_archs_mpi)))
mkdir test; cp examples/crack/* test/
cd test; mpirun -np 2 --allow-run-as-root $(BUILDDIR)/lmp < in.crack
rm -rf test
endif
execute_before_dh_python3-arch:
set -e; \
cd python/examples; \
LD_LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
PYTHONPATH=$(CURDIR)/debian/python3-lammps/usr/lib/python$(PY3VER_DEFAULT)/dist-packages:$${PYTHONPATH} \
python3 demo.py
endif
# dwz reports: .../liblammps.so.0: elf_update failed
override_dh_dwz:
dh_dwz -Xliblammps.so.0
override_dh_sphinxdoc:
echo "sphinx and dh_sphinx are broken for lammps docs. See Bug#1059621"
override_dh_compress:
dh_compress -X.pdf
|