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
|
|
|
|
2015-01-18 13:16:44 +01:00
|
|
|
TVHEADEND_VERSION = 7006b9fd88ce0cf54d59399df40fe4ee003c4180
|
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+
|
2014-06-03 08:51:55 +02:00
|
|
|
TVHEADEND_LICENSE_FILES = LICENSE.md
|
2014-11-16 13:26:26 +01:00
|
|
|
TVHEADEND_DEPENDENCIES = host-pkgconf $(if $(BR2_PACKAGE_PYTHON3),host-python3,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
|
|
|
|
|
2014-10-31 22:07:00 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_FFMPEG),y)
|
|
|
|
TVHEADEND_DEPENDENCIES += ffmpeg
|
|
|
|
TVHEADEND_CONF_OPTS += --enable-libav
|
|
|
|
else
|
|
|
|
TVHEADEND_CONF_OPTS += --disable-libav
|
|
|
|
endif
|
|
|
|
|
2014-10-14 20:28:26 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBDVBCSA),y)
|
|
|
|
TVHEADEND_DEPENDENCIES += libdvbcsa
|
|
|
|
TVHEADEND_CONF_OPTS += --enable-dvbcsa
|
|
|
|
else
|
|
|
|
TVHEADEND_CONF_OPTS += --disable-dvbcsa
|
|
|
|
endif
|
|
|
|
|
2014-06-11 15:02:06 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBICONV),y)
|
|
|
|
TVHEADEND_DEPENDENCIES += libiconv
|
|
|
|
endif
|
|
|
|
|
2014-12-06 16:00:31 +01:00
|
|
|
TVHEADEND_CFLAGS = $(TARGET_CFLAGS)
|
2014-11-23 20:56:52 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBURIPARSER),y)
|
|
|
|
TVHEADEND_DEPENDENCIES += liburiparser
|
2014-12-06 16:00:31 +01:00
|
|
|
TVHEADEND_CFLAGS += $(if $(BR2_USE_WCHAR),,-DURI_NO_UNICODE)
|
2014-11-23 20:56:52 +01:00
|
|
|
endif
|
|
|
|
|
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
|
2014-11-19 14:43:56 +01:00
|
|
|
(cd $(@D); \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2014-12-06 16:00:31 +01:00
|
|
|
CFLAGS="$(TVHEADEND_CFLAGS)" \
|
2014-11-19 14:43:56 +01:00
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--arch="$(ARCH)" \
|
|
|
|
--cpu="$(BR2_GCC_TARGET_CPU)" \
|
|
|
|
--python="$(HOST_DIR)/usr/bin/python" \
|
2014-12-14 10:53:29 +01:00
|
|
|
--enable-dvbscan \
|
2014-11-19 14:43:56 +01:00
|
|
|
--enable-bundle \
|
|
|
|
--disable-libffmpeg_static \
|
|
|
|
$(TVHEADEND_CONF_OPTS) \
|
2013-12-04 01:08:41 +01:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
2014-12-14 10:53:29 +01:00
|
|
|
# The tvheadend build system expects the transponder data to be present inside
|
|
|
|
# its source tree. To prevent a downloaded initiated by the build system just
|
|
|
|
# copy the data files in the right place and add the corresponding stamp file.
|
2013-12-04 01:08:41 +01:00
|
|
|
define TVHEADEND_BUILD_CMDS
|
2014-12-14 10:53:29 +01:00
|
|
|
$(INSTALL) -d $(@D)/data/dvb-scan
|
|
|
|
cp -r $(TARGET_DIR)/usr/share/dvb/* $(@D)/data/dvb-scan/
|
|
|
|
touch $(@D)/data/dvb-scan/.stamp
|
2013-12-04 01:08:41 +01:00
|
|
|
$(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define TVHEADEND_INSTALL_TARGET_CMDS
|
|
|
|
$(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
|
|
|
|
endef
|
|
|
|
|
2014-10-14 20:28:27 +02:00
|
|
|
# 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
|
|
|
|
|
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 \
|
2014-10-27 09:25:28 +01:00
|
|
|
$(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1
|
2013-04-12 09:14:19 +02:00
|
|
|
chmod -R go-rwx $(TARGET_DIR)/home/tvheadend
|
2012-12-28 13:37:43 +01:00
|
|
|
endef
|
2014-10-14 20:28:27 +02:00
|
|
|
TVHEADEND_POST_INSTALL_TARGET_HOOKS += TVHEADEND_INSTALL_DB
|
2012-12-28 13:37:43 +01:00
|
|
|
|
|
|
|
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
|
2014-11-03 00:39:51 +01:00
|
|
|
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
|
2013-04-12 09:14:19 +02:00
|
|
|
endef
|
|
|
|
|
2013-12-04 01:08:41 +01:00
|
|
|
$(eval $(generic-package))
|