File: rules

package info (click to toggle)
assimp 5.4.3%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 100,104 kB
  • sloc: cpp: 164,162; cobol: 65,664; ansic: 16,520; xml: 11,246; python: 5,311; java: 2,303; sh: 398; objc: 122; pascal: 100; makefile: 66
file content (109 lines) | stat: -rwxr-xr-x 3,910 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2017-2021 IOhannes m zmölnig <umlaeute@debian.org>
#
# Description: Main Debian packaging script for assimp
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 3, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# enable draco (but don't build it)
export DEB_CPPFLAGS_MAINT_APPEND  = -DASSIMP_ENABLE_DRACO=1
# package maintainers to append LDFLAGS

ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
       BUILD_DOCS = ON
else
       BUILD_DOCS = OFF
endif
ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
       BUILD_TESTS = ON
else
       BUILD_TESTS = OFF
endif
# disable all tests for now
# the tests use private symbols, and since we strip these out
# with the libassim.ver script, the tests fail to link
BUILD_TESTS = OFF

export PYBUILD_NAME=pyassimp

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -- \
		-DASSIMP_BUILD_ARCHITECTURE=$(DEB_HOST_ARCH) \
		-DASSIMP_BUILD_DOCS=$(BUILD_DOCS) \
		-DASSIMP_BUILD_ASSIMP_TOOLS=ON \
		-DASSIMP_BUILD_SAMPLES=OFF \
		-DASSIMP_BUILD_TESTS=$(BUILD_TESTS) \
		-DASSIMP_BUILD_ZLIB=OFF \
		-DASSIMP_LIB_INSTALL_DIR=lib/$(DEB_HOST_MULTIARCH) \
		-DASSIMP_WARNINGS_AS_ERRORS=OFF \
		-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--version-script=$(CURDIR)/debian/libassimp.ver $(LDFLAGS)" \
		-DCMAKE_EXE_LINKER_FLAGS="$(LDFLAGS)" \
		-DCMAKE_BUILD_RPATH_USE_ORIGIN=ON \
	        -DCMAKE_DEBUG_POSTFIX=''

ifeq ($(BUILD_DOCS),ON)
execute_after_dh_auto_build-arch:
	cd doc && doxygen Doxyfile_Cmd
endif
override_dh_auto_build-indep:
	dh_auto_build --indep --buildsystem=pybuild -- \
		-d port/PyAssimp/
ifeq ($(BUILD_DOCS),ON)
	make -C obj-$(DEB_HOST_GNU_TYPE)/doc
endif

ifeq ($(BUILD_TESTS),OFF)
override_dh_auto_test:
	# tests have been disabled, until we figure out how to make them not stall
	@echo "skipping tests"
endif

override_dh_auto_install-indep:
	dh_auto_install --indep --buildsystem=pybuild -- \
		-d port/PyAssimp/
ifeq ($(BUILD_DOCS),ON)
	make -C obj-$(DEB_HOST_GNU_TYPE)/doc install DESTDIR=$(CURDIR)/debian/tmp
endif

execute_after_dh_auto_clean-arch:
	rm -rf doc/tmp/
execute_after_dh_auto_clean-indep:
	-dh_auto_clean --indep --buildsystem=pybuild -- \
		-d port/PyAssimp/

DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
        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
# licensecheck v1
.PHONY: licensecheck
licensecheck:
	LANG=C.UTF-8 licensecheck \
		-i "^($(DEB_COPYRIGHT_CHECK_IGNORE_REGEX))$$" \
		--check '.*' --recursive --deb-machine --lines 0 * \
		> debian/copyright_newhints
	cmp debian/copyright_hints debian/copyright_newhints \
		&& rm debian/copyright_newhints