File: rules

package info (click to toggle)
openmm 7.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 106,720 kB
  • sloc: xml: 281,755; cpp: 214,835; python: 30,194; ansic: 5,638; lisp: 3,626; sh: 262; f90: 233; makefile: 207; csh: 19
file content (52 lines) | stat: -rwxr-xr-x 2,046 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
#!/usr/bin/make -f

CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) -Wl,--as-needed

export OPENMM_INCLUDE_PATH := $(CURDIR)/openmmapi/include;$(CURDIR)/olla/include;$(CURDIR)/serialization/include;$(CURDIR)/plugins/amoeba/openmmapi/include;$(CURDIR)/plugins/rpmd/openmmapi/include;$(CURDIR)/plugins/drude/openmmapi/include
export OPENMM_LIB_PATH     := $(CURDIR)/obj-${DEB_HOST_MULTIARCH}

CMAKE_FLAGS = \
        -DCMAKE_VERBOSE_MAKEFILE=ON \
        -DCMAKE_C_FLAGS_RELEASE="$(CFLAGS)" \
        -DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS)" \
        -DCMAKE_SHARED_LINKER_FLAGS_RELEASE="$(LDFLAGS)" \
        -DCMAKE_BUILD_TYPE=Release      \
        $(CMAKE_ARCH_FLAGS) \
        -DOPENMM_BUILD_AMOEBA_PLUGIN=ON \
        -DOPENMM_BUILD_RPMD_PLUGIN=ON \
        -DOPENMM_BUILD_DRUDE_PLUGIN=ON \
        -DOPENMM_BUILD_SERIALIZATION_SUPPORT=ON \
        -DOPENMM_BUILD_C_AND_FORTRAN_WRAPPERS=OFF \

%:
	dh $@ --buildsystem=cmake # --with python3

override_dh_auto_configure:
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_auto_build:
	dh_auto_build
	cd obj-*/python && python3 setup.py build

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	dh_auto_test
	cd obj-*/python/tests && PYTHONPATH=../build/lib.linux-$$(arch)-$$(py3versions -d | sed 's/^python//') pytest-3
endif

override_dh_auto_install:
	dh_auto_install -O--buildsystem=cmake
	dh_install -plibopenmm7.5  debian/tmp/usr/lib/libOpenMM.so.* usr/lib/${DEB_HOST_MULTIARCH}
	dh_install -plibopenmm-dev debian/tmp/usr/lib/libOpenMM.so   usr/lib/${DEB_HOST_MULTIARCH}
	# cd obj-*/python && python3 setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp

#override_dh_python3:
	# dh_python3
	# find debian/python3-simtk -name '*.py' \
	# 	| xargs sed -i 's/^#!\/bin\/env python/#!\/usr\/bin\/python3/'

override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info