File: rules

package info (click to toggle)
libsrtp2 2.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,488 kB
  • sloc: ansic: 19,267; sh: 3,502; makefile: 401; cpp: 17
file content (67 lines) | stat: -rwxr-xr-x 1,713 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

CONFIGURE_OPTS = --disable-stdout --enable-syslog
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
CONFIGURE_OPTS += --enable-debug
else
CONFIGURE_OPTS += --disable-debug
endif

CONFIGURE_OPTS += --enable-nss

DEB_CFLAGS_MAINT_APPEND = -D_REENTRANT

ifeq ($(DEB_HOST_ARCH_CPU),sparc)
DEB_CFLAGS_MAINT_APPEND += -DFORCE_64BIT_ALIGN
endif

# Reapply default strong optimizations unless noopt in DEB_BUILD_OPTIONS
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
DEB_CFLAGS_MAINT_STRIP = -O2
DEB_CFLAGS_MAINT_APPEND += -O4 -fexpensive-optimizations -funroll-loops
endif

export DEB_CFLAGS_MAINT_APPEND

%:
	dh $@

# TODO: stop suppress when understood how to tame dh_autoreconf
override_dh_autoreconf:

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_OPTS)

override_dh_auto_build-arch:
	dh_auto_build -- shared_library test

override_dh_auto_build-indep:
	dh_auto_build -- libsrtp2doc

# Ensure test script is executable
execute_before_dh_auto_test:
	chmod +x test/rtpw_test.sh

override_dh_auto_test-arch:
	LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(realpath .)" dh_auto_test -- runtest

override_dh_auto_test-indep:

override_dh_auto_install-indep:

# Let d-shlibs calculate development package dependencies
#  and handle shared library install
execute_after_dh_install-arch:
	d-shlibmove --commit \
		--devunversioned \
		--multiarch \
		--movedev "debian/tmp/usr/include/*" usr/include/ \
		--movedev "debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*" \
			usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so

override_dh_strip:
	dh_strip --dbgsym-migration='libsrtp2-1-dbg (<< 2.5.0-1~)'

override_dh_auto_clean:
	dh_auto_clean -- superclean