File: rules

package info (click to toggle)
kodi-inputstream-adaptive 21.5.16%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,116 kB
  • sloc: cpp: 92,227; ansic: 296; makefile: 33
file content (64 lines) | stat: -rwxr-xr-x 2,108 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# basilgello: Fix build on armel and other architectures
# silently requiring libatomic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -latomic -Wl,--as-needed -lpthread

BENTO4_COMPONENT = bento4-embedded

# bento4 configuration options
# basilgello: we build embedded libap4 as external to kodi-i-a
# because the kodi-i-a upstream requires us either to specify CMake
# toolchain file or build libap4 before kodi-i-a is configured
#
# Two CMake variables are injected into CMake cache to disable
# `find_library(BENTO4_LIBRARY` and `find_include_dir(BENTO4_INCLUDE_DIR`
# processing: BENTO4_LIBRARY and BENTO4_INCLUDE_DIR.
#
# See FindBento4.cmake and --trace-expand CMake log for
# the underlying logic
BENTO4_OPTS=\
-DCMAKE_INSTALL_PREFIX=/install \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_APPS=OFF

%:
	dh $@

bento4/install/lib/libap4.a:
	# Produce libap4.a for host architecture
	dh_auto_configure \
		--sourcedir "$(CURDIR)/$(BENTO4_COMPONENT)" \
		--builddir "$(CURDIR)/bento4/build" \
		-- $(BENTO4_OPTS)
	dh_auto_build \
		--sourcedir "$(CURDIR)/$(BENTO4_COMPONENT)" \
		--builddir "$(CURDIR)/bento4/build"
	dh_auto_install \
		--builddir "$(CURDIR)/bento4/build" \
		--destdir "$(CURDIR)/bento4"

override_dh_clean:
	dh_clean \
		bento4/

override_dh_auto_configure: bento4/install/lib/libap4.a
	# basilgello: -DCMAKE_INSTALL_DIR silences Kodi buildsystem
	# warning triggered by dh_configure unnecessarily overriding
	# install directory
	# -DUSE_LTO=0 disables LTO and makes build reproducible
	dh_auto_configure -- -DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
            -DENABLE_INTERNAL_BENTO4=0 \
            -DBUILD_SHARED_LIBS=1 \
            -DCMAKE_INSTALL_LIBDIR=/usr/lib/$(DEB_HOST_MULTIARCH)/kodi \
            -DBENTO4_LIBRARY:FILEPATH=$(CURDIR)/bento4/install/lib/libap4.a \
            -DBENTO4_INCLUDE_DIR:PATH=$(CURDIR)/bento4/install/include \
            -DUSE_LTO=0