2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-28 13:37:43 +01:00
|
|
|
#
|
|
|
|
# tvheadend
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-28 13:37:43 +01:00
|
|
|
|
2014-03-28 01:00:27 +01:00
|
|
|
TVHEADEND_VERSION = 6482d33ba90848018c530018e5c38992b8ac921c
|
2014-05-05 19:20:33 +02:00
|
|
|
TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION))
|
2014-03-28 01:00:27 +01:00
|
|
|
TVHEADEND_LICENSE = GPLv3+
|
|
|
|
TVHEADEND_LICENSE_FILES = LICENSE
|
|
|
|
TVHEADEND_DEPENDENCIES = host-pkgconf host-python openssl
|
2012-12-28 13:37:43 +01:00
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_AVAHI),y)
|
2014-03-28 01:00:27 +01:00
|
|
|
TVHEADEND_DEPENDENCIES += avahi
|
2012-12-28 13:37:43 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# tvheadend is a little smuggler and thief! ;-)
|
2014-03-28 01:00:22 +01:00
|
|
|
# During the ./configure, it downloads some files from the dtv-scan-tables
|
2012-12-28 13:37:43 +01:00
|
|
|
# package, so it has a list of pre-scanned tunner configurations.
|
|
|
|
# For buildroot, we add a patch that avoids doing that, but uses the
|
2014-03-28 01:00:22 +01:00
|
|
|
# scan files installed by the dtv-scan-tables package
|
2014-03-28 01:00:27 +01:00
|
|
|
TVHEADEND_DEPENDENCIES += dtv-scan-tables
|
2012-12-28 13:37:43 +01:00
|
|
|
|
2013-12-04 01:08:41 +01:00
|
|
|
define TVHEADEND_CONFIGURE_CMDS
|
|
|
|
(cd $(@D); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--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
|
|
|
|
|
2012-12-28 13:37:43 +01:00
|
|
|
#----------------------------------------------------------------------------
|
|
|
|
# To run tvheadend, we need:
|
|
|
|
# - a startup script, and its config file
|
|
|
|
# - a default DB with a tvheadend admin
|
2013-04-12 09:14:19 +02:00
|
|
|
# - a non-root user to run as
|
2012-12-28 13:37:43 +01:00
|
|
|
define TVHEADEND_INSTALL_DB
|
2013-04-12 09:14:19 +02:00
|
|
|
$(INSTALL) -D -m 0600 package/tvheadend/accesscontrol.1 \
|
|
|
|
$(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1
|
|
|
|
chmod -R go-rwx $(TARGET_DIR)/home/tvheadend
|
2012-12-28 13:37:43 +01:00
|
|
|
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
|
|
|
|
|
2013-04-12 09:14:19 +02:00
|
|
|
define TVHEADEND_USERS
|
|
|
|
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
|
|
|
|
endef
|
|
|
|
|
2013-12-04 01:08:41 +01:00
|
|
|
$(eval $(generic-package))
|