#!/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