File: rules

package info (click to toggle)
dlib 19.24.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292,728 kB
  • sloc: cpp: 327,411; xml: 26,686; python: 1,631; sh: 290; java: 229; makefile: 179; javascript: 73; perl: 18
file content (46 lines) | stat: -rwxr-xr-x 1,567 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# Since upstream commit 61f747d, upstream build system only builds
# either static link files or shared libraries at the same time,
# but not both. In order to generate all needed files for proper
# Debian packaging we have therefore to build two times, with
# different BUILD_SHARED_LIBS.
#
# See https://github.com/davisking/dlib/issues/923 for more info

CONFIG_SHARED_PATH  = config_shared
CONFIG_STATIC_PATH  = config_static
LIB_SOVERSION       = 19.2
EXAMPLES_PATH       = debian/libdlib$(LIB_SOVERSION)/usr/share/doc/libdlib$(LIB_SOVERSION)/examples/

%:
	dh $@ --buildsystem=cmake

override_dh_auto_configure:
	dh_auto_configure -B$(CONFIG_SHARED_PATH) -- -DDLIB_NO_GUI_SUPPORT=ON -DBUILD_SHARED_LIBS=ON -DSOVERSION=$(LIB_SOVERSION)
	dh_auto_configure -B$(CONFIG_STATIC_PATH) -- -DDLIB_NO_GUI_SUPPORT=ON -DBUILD_SHARED_LIBS=OFF -DSOVERSION=$(LIB_SOVERSION)

override_dh_auto_build:
	dh_auto_build -B$(CONFIG_STATIC_PATH)
	dh_auto_build -B$(CONFIG_SHARED_PATH)

override_dh_auto_test:
	dh_auto_test -B$(CONFIG_STATIC_PATH)
	dh_auto_test -B$(CONFIG_SHARED_PATH)

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(CONFIG_SHARED_PATH) $(CONFIG_STATIC_PATH)

override_dh_auto_install:
	dh_auto_install -B$(CONFIG_STATIC_PATH)
	dh_auto_install -B$(CONFIG_SHARED_PATH)
	# Remove empty directories
	find $(CURDIR)/debian/tmp/usr/include/dlib -type d -empty -delete

override_dh_fixperms-arch:
	dh_fixperms
	# Fix wrong permissions in examples/
	chmod 644 $(EXAMPLES_PATH)/max_cost_assignment_ex.cpp