File: rules

package info (click to toggle)
openvdb 3.2.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,848 kB
  • ctags: 14,885
  • sloc: cpp: 86,332; ansic: 4,672; makefile: 765; python: 516
file content (116 lines) | stat: -rwxr-xr-x 4,311 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
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
#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# as per upstream request:
#export DEB_CFLAGS_MAINT_APPEND = -fvisibility=hidden

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
VER_FULL = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d-)
VER_SONAME = $(shell dpkg-parsechangelog | grep '^Version' | cut -d' ' -f2 | cut -f1 -d- | cut -f1-2 -d.)

#
CFLAGS+=$(CPPFLAGS) -fvisibility=hidden -fvisibility-inlines-hidden
CXXFLAGS+=$(CPPFLAGS) -fvisibility=hidden -fvisibility-inlines-hidden

# tbb issue:
DEB_BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null)
ifeq ($(DEB_BUILD_ARCH_CPU), arm)
CXXFLAGS+=-Wa,-mimplicit-it=thumb
endif

# Disable optimization on mips* because the compiler is running out of memory
# see #847752
ifneq (,$(filter $(DEB_BUILD_ARCH_CPU), mips mipsel))
CXXFLAGS:=$(filter-out -O2,$(CXXFLAGS)) -O1
endif

# deduce documentation option (build-indep target)
ifeq "" "$(filter %-doc,$(shell dh_listpackages))"
  BUILDDOC = DOXYGEN= EPYDOC=
else
  BUILDDOC =
endif

TESTOPS = CPPUNIT_INCL_DIR=/usr/include CPPUNIT_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
					EXR_INCL_DIR=/usr/include/OpenEXR EXR_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
					ILMBASE_INCL_DIR=/usr/include/OpenEXR ILMBASE_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
					HT=/usr HDSO=/usr/lib \
					LOG4CPLUS_INCL_DIR=/usr/include LOG4CPLUS_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)
ALLOPTS = $(BUILDDOC) $(TESTOPS) BOOST_PYTHON_LIB=-lboost_python-py27 PYTHON_VERSION=2.7 \
					BOOST_PYTHON_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) PYTHON_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
					PYTHON_INCL_DIR=/usr/include/python2.7 NUMPY_INCL_DIR=/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/ \
					PYTHON_SONAME_FLAGS= \
					GLFW_INCL_DIR=/usr/include/GL GLFW_LIB_DIR=/usr/lib/$(DEB_HOST_MULTIARCH) \
					LIBS_RPATH='$(LDFLAGS) -ldl -lm -lz -lHalf -ltbb -latomic -lblosc -llog4cplus -lboost_filesystem -lboost_system -lboost_iostreams' LIBOPENVDB_RPATH= \
					verbose=yes debug=yes rpath=no shared=yes

%:
	dh $@ --parallel --with python2

MPL: LICENSE
	cp -f $< $@

override_dh_auto_build-arch:
	test -h openvdb || ln -f -s . openvdb
	dh_auto_build -- $(ALLOPTS)

override_dh_auto_test-arch:
	timeout 2h dh_auto_test -- $(TESTOPS) || true

override_dh_auto_build-indep:
	$(MAKE) doc

# No tests needed for docs
override_dh_auto_test-indep:

override_dh_auto_install-indep:

# do not run make install
override_dh_auto_install-arch:
	dh_auto_install -- $(ALLOPTS) DESTDIR=$(CURDIR)$(DESTDIR)/debian/tmp/usr DESTDIR_LIB_DIR=$(CURDIR)$(DESTDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
	rm openvdb

pkg_run = libopenvdb-tools
pkg_lib = libopenvdb$(VER_SONAME)
pkg_dev = libopenvdb-dev
pkg_doc = libopenvdb-doc
pkg_py  = python-openvdb

PYMODDIR := /usr/lib/$(shell pyversions -r)

override_dh_install-indep:

override_dh_install-arch:
	dh_numpy --package=$(pkg_py)
	dh_install -p$(pkg_run) debian/tmp/usr/bin
	dh_install -p$(pkg_lib) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libopenvdb.so.$(VER_SONAME)
	dh_install -p$(pkg_lib) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libopenvdb.so.$(VER_FULL)
	dh_install -p$(pkg_dev) debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libopenvdb.so
	dh_install -p$(pkg_dev) debian/tmp/usr/include
	#dh_install -p$(pkg_doc) debian/tmp/usr/share/doc
	dh_install -p$(pkg_py)  debian/tmp/usr/python/lib/python2.7/pyopenvdb.so $(PYMODDIR)/dist-packages/

override_dh_installdocs: MPL
	dh_installdocs -A $^

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

override_dh_clean:
	#test -h openvdb || { unlink openvdb; }
	dh_clean doc/doxygen_sqlite3.db

# man page cannot be automatically generated since we need to cleanup help2man output
debian/vdb_print.1: debian/vdb_print.1.in
	help2man --version-string=$(VER_FULL) --include=$< --output=$@ --no-info --no-discard-stderr vdb_print

debian/vdb_view.1: debian/vdb_view.1.in
	help2man --version-string=$(VER_FULL) --include=$< --output=$@ --no-info --no-discard-stderr vdb_view

debian/vdb_render.1: debian/vdb_render.1.in
	help2man --version-string=$(VER_FULL) --include=$< --output=$@ --no-info --no-discard-stderr vdb_render

get-orig-source:
	uscan --verbose --force-download --rename --repack