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
|
|
|
|
2016-06-01 21:28:48 +02:00
|
|
|
TVHEADEND_VERSION = 8e637f9f903f6d820f701a1461b144e67665c6fa
|
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
|
2015-06-20 13:32:52 +02:00
|
|
|
TVHEADEND_DEPENDENCIES = \
|
|
|
|
host-gettext \
|
|
|
|
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
|
|
|
|
|
2015-10-12 22:39:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_DBUS),y)
|
|
|
|
TVHEADEND_DEPENDENCIES += dbus
|
|
|
|
TVHEADEND_CONF_OPTS += --enable-dbus-1
|
|
|
|
else
|
|
|
|
TVHEADEND_CONF_OPTS += --disable-dbus-1
|
|
|
|
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
|
|
|
|
|
2016-01-23 10:44:57 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBHDHOMERUN),y)
|
|
|
|
TVHEADEND_DEPENDENCIES += libhdhomerun
|
|
|
|
TVHEADEND_CONF_OPTS += --enable-hdhomerun_client
|
|
|
|
else
|
|
|
|
TVHEADEND_CONF_OPTS += --disable-hdhomerun_client
|
|
|
|
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
|
|
|
|
2015-04-09 20:16:08 +02:00
|
|
|
# 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
|
|
|
|
|
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)" \
|
2016-03-13 21:05:06 +01:00
|
|
|
--nowerror \
|
2014-11-19 14:43:56 +01:00
|
|
|
--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 \
|
2016-03-28 21:49:44 +02:00
|
|
|
--disable-ffmpeg_static \
|
2016-01-23 10:44:55 +01:00
|
|
|
--disable-hdhomerun_static \
|
2014-11-19 14:43:56 +01:00
|
|
|
$(TVHEADEND_CONF_OPTS) \
|
2013-12-04 01:08:41 +01:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define TVHEADEND_BUILD_CMDS
|
|
|
|
$(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
|
2016-03-28 17:15:47 +02:00
|
|
|
# - 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)
|
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
|
2016-03-28 17:15:47 +02:00
|
|
|
define TVHEADEND_PERMISSIONS
|
|
|
|
/home/tvheadend r 0700 tvheadend tvheadend - - - - -
|
|
|
|
endef
|
2013-04-12 09:14:19 +02:00
|
|
|
|
2013-12-04 01:08:41 +01:00
|
|
|
$(eval $(generic-package))
|