50a8ff5c5b
tvheadend tries to impersonate an autotools package, when it is not. This breaks the build. tvheadend's ./configure tries to run compiled code. This breaks the build. Switch tvheadend over to using the generic-package infrastructure, and provide carefully-crafted _CMDS for each steps. We still keep a post-install hook to install our "DB" since it is not part of tvheadend, but an addition of our own packaging of tvheadend. Fixes: http://autobuild.buildroot.net/results/3ea/3eaa17b94975477263fe12e201eec9cbeeb2912c/ http://autobuild.buildroot.net/results/7c8/7c85db0dfab98808c97a5ef17dec9d1071dc0d49/ and a few others as well. [Peter: tweak 004-dont-run-compiled-code.patch description as pointed out by Thomas] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
69 lines
2.2 KiB
Makefile
69 lines
2.2 KiB
Makefile
################################################################################
|
|
#
|
|
# tvheadend
|
|
#
|
|
################################################################################
|
|
|
|
TVHEADEND_VERSION = c7d0335eb10d02b780423bef8e7c740e422fff13
|
|
TVHEADEND_SITE = git://github.com/tvheadend/tvheadend.git
|
|
TVHEADEND_LICENSE = GPLv3+
|
|
TVHEADEND_LICENSE_FILES = LICENSE
|
|
TVHEADEND_DEPENDENCIES = host-pkgconf host-python openssl
|
|
|
|
ifeq ($(BR2_PACKAGE_AVAHI),y)
|
|
TVHEADEND_DEPENDENCIES += avahi
|
|
endif
|
|
|
|
#----------------------------------------------------------------------------
|
|
# tvheadend is a little smuggler and thief! ;-)
|
|
# During the ./configure, it downloads some files from the dvb-apps
|
|
# package, so it has a list of pre-scanned tunner configurations.
|
|
# For buildroot, we add a patch that avoids doing that, but uses the
|
|
# scan files installed by the dvb-apps package
|
|
TVHEADEND_DEPENDENCIES += dvb-apps
|
|
|
|
define TVHEADEND_CONFIGURE_CMDS
|
|
(cd $(@D); \
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--cc="$(TARGET_CC)" \
|
|
--cflags="$(TARGET_CFLAGS)" \
|
|
--arch="$(ARCH)" \
|
|
--cpu="$(BR2_GCC_TARGET_CPU)" \
|
|
--python="$(HOST_DIR)/usr/bin/python" \
|
|
)
|
|
endef
|
|
|
|
define TVHEADEND_BUILD_CMDS
|
|
$(MAKE) -C $(@D)
|
|
endef
|
|
|
|
define TVHEADEND_INSTALL_TARGET_CMDS
|
|
$(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
|
|
endef
|
|
|
|
#----------------------------------------------------------------------------
|
|
# To run tvheadend, we need:
|
|
# - a startup script, and its config file
|
|
# - a default DB with a tvheadend admin
|
|
# - a non-root user to run as
|
|
define TVHEADEND_INSTALL_DB
|
|
$(INSTALL) -D -m 0600 package/tvheadend/accesscontrol.1 \
|
|
$(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1
|
|
chmod -R go-rwx $(TARGET_DIR)/home/tvheadend
|
|
endef
|
|
TVHEADEND_POST_INSTALL_TARGET_HOOKS = TVHEADEND_INSTALL_DB
|
|
|
|
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
|
|
|
|
$(eval $(generic-package))
|