Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- mode: makefile; coding: utf-8 -*-
3 # Copyright © 2017-2021 IOhannes m zmölnig <[email protected]>
4 #
5 # Description: Main Debian packaging script for assimp
6 #
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 3, or (at
10 # your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20 # See debhelper(7) (uncomment to enable)
21 # output every command that modifies files on the build system.
22 #export DH_VERBOSE = 1
23
24 # see FEATURE AREAS in dpkg-buildflags(1)
25 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
26
27 # see ENVIRONMENT in dpkg-buildflags(1)
28 # package maintainers to append CFLAGS
29 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
30 # enable draco (but don't build it)
31 export DEB_CPPFLAGS_MAINT_APPEND = -DASSIMP_ENABLE_DRACO=1
32 # package maintainers to append LDFLAGS
33
34 ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
35 BUILD_DOCS = ON
36 else
37 BUILD_DOCS = OFF
38 endif
39 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
40 BUILD_TESTS = ON
41 else
42 BUILD_TESTS = OFF
43 endif
44 # disable all tests for now
45 # the tests use private symbols, and since we strip these out
46 # with the libassim.ver script, the tests fail to link
47 BUILD_TESTS = OFF
48
49 export PYBUILD_NAME=pyassimp
50
51 %:
52 dh $@ --buildsystem=cmake
53
54 override_dh_auto_configure:
55 dh_auto_configure -- \
56 -DASSIMP_BUILD_ARCHITECTURE=$(DEB_HOST_ARCH) \
57 -DASSIMP_BUILD_DOCS=$(BUILD_DOCS) \
58 -DASSIMP_BUILD_ASSIMP_TOOLS=ON \
59 -DASSIMP_BUILD_SAMPLES=OFF \
60 -DASSIMP_BUILD_TESTS=$(BUILD_TESTS) \
61 -DASSIMP_BUILD_ZLIB=OFF \
62 -DASSIMP_LIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH) \
63 -DASSIMP_WARNINGS_AS_ERRORS=OFF \
64 -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--version-script=$(CURDIR)/debian/libassimp.ver $(LDFLAGS)" \
65 -DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
66 -DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \
67 -DCMAKE_DEBUG_POSTFIX=''
68
69 ifeq ($(BUILD_DOCS),ON)
70 execute_after_dh_auto_build-arch:
71 cd doc && doxygen Doxyfile_Cmd
72 endif
73 override_dh_auto_build-indep:
74 dh_auto_build --indep --buildsystem=pybuild -- \
75 -d port/PyAssimp/
76 ifeq ($(BUILD_DOCS),ON)
77 make -C obj-$(DEB_HOST_GNU_TYPE)/doc
78 endif
79
80 ifeq ($(BUILD_TESTS),OFF)
81 override_dh_auto_test:
82 # tests have been disabled, until we figure out how to make them not stall
83 @echo "skipping tests"
84 endif
85
86 override_dh_auto_install-indep:
87 dh_auto_install --indep --buildsystem=pybuild -- \
88 -d port/PyAssimp/
89 ifeq ($(BUILD_DOCS),ON)
90 make -C obj-$(DEB_HOST_GNU_TYPE)/doc install DESTDIR=$(CURDIR)/debian/tmp
91 endif
92
93 execute_after_dh_auto_clean-arch:
94 rm -rf doc/tmp/
95 execute_after_dh_auto_clean-indep:
96 -dh_auto_clean --indep --buildsystem=pybuild -- \
97 -d port/PyAssimp/
98
99 DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
100 debian/.*|tools/assimp_view/(base\.PNG|HUD\.png)|tools/shared/(default_icon\.xcf|assimp_tools_icon\.(png|ico))|tools/assimp_view/(.*\.bmp|.*\.png|text1\.bin|test\.xcf)|tools/assimp_qt_viewer/doc/.*\.odt|port/PyAssimp/3d_viewer_screenshot\.png|port/Assimp\.NET/CSharpViewerScreenShot\.PNG|doc/AssimpDoc_Html/AnimationOverview\.png|doc/architecture/.*\.png|samples/SimpleAssimpViewX/MyDocument\.xcdatamodel/(elements|layout)|test/models/.*|.*/dragonsplash\.png
101 # licensecheck v1
102 .PHONY: licensecheck
103 licensecheck:
104 LANG=C.UTF-8 licensecheck \
105 -i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
106 --check '.*' --recursive --deb-machine --lines 0 * \
107 > debian/copyright_newhints
108 cmp debian/copyright_hints debian/copyright_newhints \
109 && rm debian/copyright_newhints