File: rules

package info (click to toggle)
avogadro 1.2.0-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 60,228 kB
  • sloc: cpp: 101,178; ansic: 33,903; python: 1,711; sh: 923; perl: 321; makefile: 54; ruby: 14
file content (41 lines) | stat: -rwxr-xr-x 1,150 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
#!/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

PYTHON_VERSION     := $(shell pyversions -dv)

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

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

%:
	dh $@ --with python2

override_dh_auto_configure:
	dh_auto_configure -- \
	-DENABLE_GLSL=ON \
	-DENABLE_RPATH=OFF \
	-DENABLE_UPDATE_CHECKER=OFF \
	-DPYTHON_EXECUTABLE=/usr/bin/python$(PYTHON_VERSION) \
	-DPYTHON_LIBRARY=$(PYTHON_LIBRARY) \
	-DPYTHON_INCLUDE_DIR=/usr/include/python$(PYTHON_VERSION)/

override_dh_install:
	dh_install --list-missing

override_dh_clean:
	dh_clean conf.log conf.pri

override_dh_python2:
	dh_python2 -ppython-avogadro
	dh_numpy -ppython-avogadro
	dh_sip