1 ################################################################################
5 ################################################################################
7 TVHEADEND_VERSION
= 8e637f9f903f6d820f701a1461b144e67665c6fa
8 TVHEADEND_SITE
= $(call github
,tvheadend
,tvheadend
,$(TVHEADEND_VERSION
))
9 TVHEADEND_LICENSE
= GPLv3
+
10 TVHEADEND_LICENSE_FILES
= LICENSE.md
11 TVHEADEND_DEPENDENCIES
= \
14 $(if
$(BR2_PACKAGE_PYTHON3
),host-python3
,host-python
) \
17 ifeq ($(BR2_PACKAGE_AVAHI
),y
)
18 TVHEADEND_DEPENDENCIES
+= avahi
21 ifeq ($(BR2_PACKAGE_DBUS
),y
)
22 TVHEADEND_DEPENDENCIES
+= dbus
23 TVHEADEND_CONF_OPTS
+= --enable-dbus-1
25 TVHEADEND_CONF_OPTS
+= --disable-dbus-1
28 ifeq ($(BR2_PACKAGE_FFMPEG
),y
)
29 TVHEADEND_DEPENDENCIES
+= ffmpeg
30 TVHEADEND_CONF_OPTS
+= --enable-libav
32 TVHEADEND_CONF_OPTS
+= --disable-libav
35 ifeq ($(BR2_PACKAGE_LIBDVBCSA
),y
)
36 TVHEADEND_DEPENDENCIES
+= libdvbcsa
37 TVHEADEND_CONF_OPTS
+= --enable-dvbcsa
39 TVHEADEND_CONF_OPTS
+= --disable-dvbcsa
42 ifeq ($(BR2_PACKAGE_LIBHDHOMERUN
),y
)
43 TVHEADEND_DEPENDENCIES
+= libhdhomerun
44 TVHEADEND_CONF_OPTS
+= --enable-hdhomerun_client
46 TVHEADEND_CONF_OPTS
+= --disable-hdhomerun_client
49 ifeq ($(BR2_PACKAGE_LIBICONV
),y
)
50 TVHEADEND_DEPENDENCIES
+= libiconv
53 TVHEADEND_CFLAGS
= $(TARGET_CFLAGS
)
54 ifeq ($(BR2_PACKAGE_LIBURIPARSER
),y
)
55 TVHEADEND_DEPENDENCIES
+= liburiparser
56 TVHEADEND_CFLAGS
+= $(if
$(BR2_USE_WCHAR
),,-DURI_NO_UNICODE
)
59 TVHEADEND_DEPENDENCIES
+= dtv-scan-tables
61 # The tvheadend build system expects the transponder data to be present inside
62 # its source tree. To prevent a download initiated by the build system just
63 # copy the data files in the right place and add the corresponding stamp file.
64 define TVHEADEND_INSTALL_DTV_SCAN_TABLES
65 $(INSTALL
) -d
$(@D
)/data
/dvb-scan
66 cp
-r
$(TARGET_DIR
)/usr
/share
/dvb
/* $(@D
)/data
/dvb-scan
/
67 touch
$(@D
)/data
/dvb-scan
/.stamp
69 TVHEADEND_PRE_CONFIGURE_HOOKS
+= TVHEADEND_INSTALL_DTV_SCAN_TABLES
71 define TVHEADEND_CONFIGURE_CMDS
73 $(TARGET_CONFIGURE_OPTS
) \
74 $(TARGET_CONFIGURE_ARGS
) \
75 CFLAGS
="$(TVHEADEND_CFLAGS)" \
79 --cpu
="$(BR2_GCC_TARGET_CPU)" \
81 --python
="$(HOST_DIR)/usr/bin/python" \
84 --disable-ffmpeg_static \
85 --disable-hdhomerun_static \
86 $(TVHEADEND_CONF_OPTS
) \
90 define TVHEADEND_BUILD_CMDS
94 define TVHEADEND_INSTALL_TARGET_CMDS
95 $(MAKE
) -C
$(@D
) DESTDIR
="$(TARGET_DIR)" install
98 # Remove documentation and source files that are not needed because we
99 # use the bundled web interface version.
100 define TVHEADEND_CLEAN_SHARE
101 rm -rf
$(TARGET_DIR
)/usr
/share
/tvheadend
/docs
102 rm -rf
$(TARGET_DIR
)/usr
/share
/tvheadend
/src
105 TVHEADEND_POST_INSTALL_TARGET_HOOKS
+= TVHEADEND_CLEAN_SHARE
107 #----------------------------------------------------------------------------
108 # To run tvheadend, we need:
109 # - a startup script, and its config file
110 # - a non-root user to run as, and a home for it that is not accessible
111 # to the other users (because there will be crendentials in there)
113 define TVHEADEND_INSTALL_INIT_SYSV
114 $(INSTALL
) -D package
/tvheadend
/etc.default.tvheadend
$(TARGET_DIR
)/etc
/default
/tvheadend
115 $(INSTALL
) -D package
/tvheadend
/S99tvheadend
$(TARGET_DIR
)/etc
/init.d
/S99tvheadend
118 define TVHEADEND_USERS
119 tvheadend
-1 tvheadend
-1 * /home
/tvheadend
- video TVHeadend daemon
121 define TVHEADEND_PERMISSIONS
122 /home
/tvheadend r
0700 tvheadend tvheadend
- - - - -
125 $(eval
$(generic-package
))