Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 CONFIGURE_OPTS = --disable-stdout --enable-syslog
4 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
5 CONFIGURE_OPTS += --enable-debug
6 else
7 CONFIGURE_OPTS += --disable-debug
8 endif
9
10 CONFIGURE_OPTS += --enable-nss
11
12 DEB_CFLAGS_MAINT_APPEND = -D_REENTRANT
13
14 ifeq ($(DEB_HOST_ARCH_CPU),sparc)
15 DEB_CFLAGS_MAINT_APPEND += -DFORCE_64BIT_ALIGN
16 endif
17
18 # Reapply default strong optimizations unless noopt in DEB_BUILD_OPTIONS
19 ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
20 DEB_CFLAGS_MAINT_STRIP = -O2
21 DEB_CFLAGS_MAINT_APPEND += -O4 -fexpensive-optimizations -funroll-loops
22 endif
23
24 export DEB_CFLAGS_MAINT_APPEND
25
26 %:
27 dh $@
28
29 override_dh_auto_configure:
30 dh_auto_configure -- $(CONFIGURE_OPTS)
31
32 override_dh_auto_build-arch:
33 dh_auto_build -- shared_library test
34
35 override_dh_auto_build-indep:
36 dh_auto_build -- libsrtp2doc
37
38 # Ensure test script is executable
39 execute_before_dh_auto_test:
40 chmod +x test/rtpw_test.sh
41
42 override_dh_auto_test-arch:
43 LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:$(realpath .)" dh_auto_test -- runtest
44
45 override_dh_auto_test-indep:
46
47 override_dh_auto_install-indep:
48
49 # Let d-shlibs calculate development package dependencies
50 # and handle shared library install
51 execute_after_dh_install-arch:
52 d-shlibmove --commit \
53 --devunversioned \
54 --multiarch \
55 --movedev "debian/tmp/usr/include/*" usr/include/ \
56 --movedev "debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*" \
57 usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
58 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so
59
60 override_dh_strip:
61 dh_strip --dbgsym-migration='libsrtp2-1-dbg (<< 2.5.0-1~)'
62
63 override_dh_auto_clean:
64 dh_auto_clean -- superclean