Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Uncomment this to turn on verbose mode.
4 # export DH_VERBOSE=1
5
6 # see FEATURE AREAS in dpkg-buildflags(1)
7 export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
8
9 # see ENVIRONMENT in dpkg-buildflags(1)
10 # package maintainers to append CFLAGS
11 #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
12 # package maintainers to append LDFLAGS
13 export DEB_LDFLAGS_MAINT_APPEND =
14
15 %:
16 dh $@ --buildsystem=cmake
17
18 # https://gitlab.archlinux.org/archlinux/packaging/packages/libyuv/-/blob/main/PKGBUILD
19 execute_before_dh_auto_configure:
20 sed -i 's|yuvconvert $${JPEG_LIBRARY}|$${ly_lib_shared} $${JPEG_LIBRARY}|g' ./CMakeLists.txt
21
22 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
23 LIBYUV_TEST_FLAG := ON
24 else
25 LIBYUV_TEST_FLAG := OFF
26 endif
27
28 # Known broken googletest
29 # hppa: requested in https://bugs.debian.org/1021606
30 ifneq (,$(filter $(DEB_HOST_ARCH), armel hppa s390x powerpc ppc64 sparc64))
31 LIBYUV_TEST_FLAG = OFF
32 endif
33
34 override_dh_auto_configure:
35 dh_auto_configure -- \
36 -DUNIT_TEST=$(LIBYUV_TEST_FLAG) \
37 -DGTEST_SRC_DIR=/usr/src/googletest/googletest \
38 $(NULL)
39
40 execute_after_dh_auto_test:
41 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
42 -find . -name libyuv_unittest
43 ( exec $$(find . -name libyuv_unittest) )
44 endif