Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 export DH_VERBOSE = 1
3 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
4 export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
5
6 # Standardized flags from /usr/share/perl5/Debian/Debhelper/Buildsystem/cmake.pm.
7 CMAKE_OPTS := -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
8 # Enable some features that are disabled by default
9 EXTRA_OPTS := -DENABLE_SHOW_PROJECT_CONFIG=ON -DENABLE_UINTTESTS=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),OFF,ON) # unit tests require libgtest-dev
10 # -DENABLE_EXAMPLES=ON -> Example Apps -> will be installed in source form and handled via autopkgtests
11 # -DENABLE_TESTING=ON -> DEVEL APPS (testing), some with rather generic names -> no need to install
12 # Restrict upstream unit testing to architectures upstream focuses on (and some where the tests succeed nonetheless)
13 # test suite failures reported at https://github.com/Haivision/srt/issues/2267
14 test_archs = amd64 i386 arm64 armel armhf mips64el mipsel riscv64 x32
15
16 include /usr/share/dpkg/default.mk # provides DEB_VERSION
17
18 %:
19 dh $@ --buildsystem=cmake+makefile $(DH_ADDONS)
20 build binary %-indep: DH_ADDONS=--with=sphinxdoc
21
22 override_dh_auto_configure-arch:
23 dh_auto_configure --builddirectory=build-openssl -- $(CMAKE_OPTS) $(EXTRA_OPTS) -DUSE_ENCLIB=openssl
24 dh_auto_configure --builddirectory=build-gnutls -- $(CMAKE_OPTS) $(EXTRA_OPTS) -DUSE_ENCLIB=gnutls -DTARGET_srt=srt-gnutls
25
26 # not needed for arch-indep only builds
27 override_dh_auto_configure-indep:
28
29 override_dh_auto_build-arch:
30 dh_auto_build --builddirectory=build-openssl
31 dh_auto_build --builddirectory=build-gnutls
32
33 override_dh_auto_build-indep:
34 http_proxy='http://127.0.0.1:9/' sphinx-build -N -c debian -d debian/doctrees -bhtml docs debian/html
35
36 override_dh_auto_install-arch:
37 dh_auto_install --builddirectory=build-openssl
38 dh_auto_install --builddirectory=build-gnutls # this overwrites the *.pc files so we later need to install them from the respective builddirectory
39
40 # unbreak arch-indep only builds
41 override_dh_auto_install-indep:
42
43 override_dh_installman-arch:
44 help2man --help-option=-help --no-discard-stderr --no-info --version-string="$(DEB_VERSION)" \
45 --name "SRT sample application to transmit files" \
46 -o ./debian/srt-file-transmit.1 ./build-gnutls/srt-file-transmit
47 help2man --help-option=-help --no-discard-stderr --no-info --version-string="$(DEB_VERSION)" \
48 --name "SRT sample application to transmit live streaming" \
49 -o ./debian/srt-live-transmit.1 ./build-gnutls/srt-live-transmit
50 dh_installman
51
52 # unbreak arch-indep only builds
53 override_dh_installman-indep:
54
55 override_dh_auto_test-arch:
56 ifneq (,$(filter $(DEB_HOST_ARCH), $(test_archs)))
57 # must be executed consecutively lest they interfer with each other!
58 dh_auto_test --no-parallel --builddirectory=build-openssl
59 dh_auto_test --no-parallel --builddirectory=build-gnutls
60 endif
61
62 # unbreak arch-indep only builds
63 override_dh_auto_test-indep: