File: rules

package info (click to toggle)
hm 18.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,544 kB
  • sloc: cpp: 71,684; python: 4,382; sh: 471; makefile: 186; ansic: 16
file content (41 lines) | stat: -rwxr-xr-x 1,605 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 DEB_BUILD_MAINT_OPTIONS = hardening=+all

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export BUILDDIR_STANDARD=obj-$(DEB_HOST_MULTIARCH)
export BUILDDIR_HIGHBITDEPTH=obj-$(DEB_HOST_MULTIARCH)-highbitdepth

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure --buildsystem=cmake --builddirectory="$(BUILDDIR_STANDARD)" -- \
		-DCMAKE_BUILD_TYPE:STRING=Release \
		-DCMAKE_INSTALL_PREFIX:PATH=/usr \
		-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
		-DHIGH_BITDEPTH:BOOL='OFF'

	dh_auto_configure --buildsystem=cmake --builddirectory="$(BUILDDIR_HIGHBITDEPTH)" -- \
		-DCMAKE_BUILD_TYPE:STRING=Release \
		-DCMAKE_INSTALL_PREFIX:PATH=/usr \
		-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)" \
		-DHIGH_BITDEPTH:BOOL='ON'

override_dh_auto_build:
	# Build and install standard bit depth binaries regularly.
	dh_auto_build --buildsystem=cmake --builddirectory="$(BUILDDIR_STANDARD)"
	for filename in $$(find "bin" -maxdepth 1 -type f -executable); do \
		install -D -m755 "$$filename" "$(BUILDDIR_STANDARD)/usr/$$filename"; \
	done

	# Build high bit depth binaries and install with an updated name.
	dh_auto_build --buildsystem=cmake --builddirectory="$(BUILDDIR_HIGHBITDEPTH)"
	for filename in $$(find "bin" -maxdepth 1 -type f -executable | sed 's|bin/||'); do \
		install -D -m755 "bin/$$filename" "$(BUILDDIR_HIGHBITDEPTH)/usr/bin/$$(echo $$filename | sed 's/Static/StaticHighBitDepth/')"; \
	done

override_dh_compress:
	# Don't compress software manual and example configurations.
	dh_compress -X.pdf -X.cfg