File: rules

package info (click to toggle)
openvdb 5.2.0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,132 kB
  • sloc: cpp: 110,785; ansic: 5,195; makefile: 845; python: 518
file content (124 lines) | stat: -rwxr-xr-x 4,728 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
117
118
119
120
121
122
123
124
#!/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 / #879636
ifneq (,$(filter $(DEB_BUILD_ARCH_CPU), mips mipsel sh4))
CXXFLAGS:=$(filter-out -O2,$(CXXFLAGS)) --param ggc-min-expand=10 -O1
endif
# -g is already passed through different mechanism, simply set OPTIMIZE make
#  variable on mips/el. -g1 seems to be solve symptoms, eg. #890237
ifneq (,$(filter $(DEB_BUILD_ARCH_CPU), mips mipsel))
OPTIMIZE=-g1
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) OPTIMIZE=$(OPTIMIZE) \
					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_python27 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

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

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