File: rules

package info (click to toggle)
avogadrolibs 1.93.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 15,440 kB
  • sloc: cpp: 95,190; ansic: 2,215; python: 1,062; sh: 440; perl: 321; makefile: 36
file content (51 lines) | stat: -rwxr-xr-x 1,484 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
#!/usr/bin/make -f

#export DH_VERBOSE=1

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

PYTHON3_VERSION     := $(shell py3versions -dv)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/libpython$(PYTHON3_VERSION).so),)
PYTHON3_LIBRARY=/usr/lib/$(DEB_HOST_MULTIARCH)/libpython$(PYTHON3_VERSION).so
else
PYTHON3_LIBRARY=/usr/lib/libpython$(PYTHON3_VERSION).so
endif

CMAKE_OPTS=-DUSE_HDF5=ON \
	    -DUSE_LIBMSYM=OFF \
	    -DUSE_MMTF=OFF \
	    -DUSE_MOLEQUEUE=OFF \
	    -DOpenGL_GL_PREFERENCE=GLVND \
	    -DCMAKE_SKIP_RPATH=TRUE \
	    -DUSE_PYTHON=ON \
	    -DENABLE_TRANSLATIONS=ON

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

override_dh_auto_configure-arch:
	dh_auto_configure -- $(CMAKE_OPTS)

override_dh_auto_configure-indep:
	dh_auto_configure -- -DBUILD_DOCUMENTATION=ON $(CMAKE_OPTS)

override_dh_auto_build-indep:
	cd obj-$(DEB_HOST_GNU_TYPE); make documentation

override_dh_auto_install-arch:
	dh_auto_install -a
	cp -r obj-$(DEB_HOST_GNU_TYPE)/bin debian/tmp/usr

override_dh_auto_install-indep:
	if [ ! -d debian/tmp ]; then mkdir -p debian/tmp; fi
	cp -r obj-$(DEB_HOST_GNU_TYPE)/docs/html debian/tmp

override_dh_install:
	dh_install
	dh_missing --list-missing