* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
175 lines
4.8 KiB
Makefile
175 lines
4.8 KiB
Makefile
################################################################################
|
|
#
|
|
# tvheadend
|
|
#
|
|
################################################################################
|
|
|
|
TVHEADEND_VERSION = 6b8f014c39703640a1fe8af9c2b7663588ed2b56
|
|
TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION))
|
|
TVHEADEND_LICENSE = GPL-3.0+
|
|
TVHEADEND_LICENSE_FILES = LICENSE.md
|
|
TVHEADEND_DEPENDENCIES = \
|
|
host-gettext \
|
|
host-pkgconf \
|
|
host-pngquant \
|
|
$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) \
|
|
openssl
|
|
|
|
ifeq ($(BR2_PACKAGE_AVAHI),y)
|
|
TVHEADEND_DEPENDENCIES += avahi
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
|
TVHEADEND_DEPENDENCIES += dbus
|
|
TVHEADEND_CONF_OPTS += --enable-dbus-1
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-dbus-1
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_TVHEADEND_TRANSCODING),y)
|
|
TVHEADEND_CONF_OPTS += --enable-libav --enable-libx264
|
|
TVHEADEND_DEPENDENCIES += ffmpeg x264
|
|
ifeq ($(BR2_PACKAGE_LIBVA)$(BR2_PACKAGE_XORG7),yy)
|
|
TVHEADEND_CONF_OPTS += --enable-vaapi
|
|
TVHEADEND_DEPENDENCIES += libva
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-vaapi
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_OPUS),y)
|
|
TVHEADEND_CONF_OPTS += --enable-libopus
|
|
TVHEADEND_DEPENDENCIES += opus
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-libopus
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
|
TVHEADEND_CONF_OPTS += --enable-omx
|
|
TVHEADEND_DEPENDENCIES += rpi-userland
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-omx
|
|
endif
|
|
ifeq ($(BR2_PACKAGE_X265),y)
|
|
TVHEADEND_CONF_OPTS += --enable-libx265
|
|
TVHEADEND_DEPENDENCIES += x265
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-libx265
|
|
endif
|
|
else
|
|
TVHEADEND_CONF_OPTS += \
|
|
--disable-libav \
|
|
--disable-libopus \
|
|
--disable-omx \
|
|
--disable-vaapi \
|
|
--disable-libx264 \
|
|
--disable-libx265
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBDVBCSA),y)
|
|
TVHEADEND_DEPENDENCIES += libdvbcsa
|
|
TVHEADEND_CONF_OPTS += --enable-tvhcsa
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-tvhcsa
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBHDHOMERUN),y)
|
|
TVHEADEND_DEPENDENCIES += libhdhomerun
|
|
TVHEADEND_CONF_OPTS += --enable-hdhomerun_client
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-hdhomerun_client
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
TVHEADEND_DEPENDENCIES += libiconv
|
|
endif
|
|
|
|
TVHEADEND_CFLAGS = $(TARGET_CFLAGS)
|
|
ifeq ($(BR2_PACKAGE_LIBURIPARSER),y)
|
|
TVHEADEND_DEPENDENCIES += liburiparser
|
|
TVHEADEND_CFLAGS += $(if $(BR2_USE_WCHAR),,-DURI_NO_UNICODE)
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_PCRE),y)
|
|
TVHEADEND_DEPENDENCIES += pcre
|
|
TVHEADEND_CONF_OPTS += --enable-pcre
|
|
else
|
|
TVHEADEND_CONF_OPTS += --disable-pcre
|
|
endif
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
|
|
TVHEADEND_CONF_OPTS += --disable-pie
|
|
endif
|
|
|
|
TVHEADEND_DEPENDENCIES += dtv-scan-tables
|
|
|
|
# The tvheadend build system expects the transponder data to be present inside
|
|
# its source tree. To prevent a download initiated by the build system just
|
|
# copy the data files in the right place and add the corresponding stamp file.
|
|
define TVHEADEND_INSTALL_DTV_SCAN_TABLES
|
|
$(INSTALL) -d $(@D)/data/dvb-scan
|
|
cp -r $(TARGET_DIR)/usr/share/dvb/* $(@D)/data/dvb-scan/
|
|
touch $(@D)/data/dvb-scan/.stamp
|
|
endef
|
|
TVHEADEND_PRE_CONFIGURE_HOOKS += TVHEADEND_INSTALL_DTV_SCAN_TABLES
|
|
|
|
define TVHEADEND_CONFIGURE_CMDS
|
|
(cd $(@D); \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
CFLAGS="$(TVHEADEND_CFLAGS)" \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--arch="$(ARCH)" \
|
|
--cpu="$(GCC_TARGET_CPU)" \
|
|
--nowerror \
|
|
--python="$(HOST_DIR)/bin/python" \
|
|
--enable-dvbscan \
|
|
--enable-bundle \
|
|
--enable-pngquant \
|
|
--disable-ffmpeg_static \
|
|
--disable-hdhomerun_static \
|
|
$(TVHEADEND_CONF_OPTS) \
|
|
)
|
|
endef
|
|
|
|
define TVHEADEND_FIX_PNGQUANT_PATH
|
|
$(SED) "s%^pngquant_bin =.*%pngquant_bin = '$(HOST_DIR)/bin/pngquant'%" \
|
|
$(@D)/support/mkbundle
|
|
endef
|
|
TVHEADEND_POST_CONFIGURE_HOOKS += TVHEADEND_FIX_PNGQUANT_PATH
|
|
|
|
define TVHEADEND_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
endef
|
|
|
|
define TVHEADEND_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
|
|
endef
|
|
|
|
# Remove documentation and source files that are not needed because we
|
|
# use the bundled web interface version.
|
|
define TVHEADEND_CLEAN_SHARE
|
|
rm -rf $(TARGET_DIR)/usr/share/tvheadend/docs
|
|
rm -rf $(TARGET_DIR)/usr/share/tvheadend/src
|
|
endef
|
|
|
|
TVHEADEND_POST_INSTALL_TARGET_HOOKS += TVHEADEND_CLEAN_SHARE
|
|
|
|
#----------------------------------------------------------------------------
|
|
# To run tvheadend, we need:
|
|
# - a startup script, and its config file
|
|
# - a non-root user to run as, and a home for it that is not accessible
|
|
# to the other users (because there will be crendentials in there)
|
|
|
|
define TVHEADEND_INSTALL_INIT_SYSV
|
|
$(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend
|
|
$(INSTALL) -D package/tvheadend/S99tvheadend $(TARGET_DIR)/etc/init.d/S99tvheadend
|
|
endef
|
|
|
|
define TVHEADEND_USERS
|
|
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
|
|
endef
|
|
define TVHEADEND_PERMISSIONS
|
|
/home/tvheadend r 0700 tvheadend tvheadend - - - - -
|
|
endef
|
|
|
|
$(eval $(generic-package))
|