1 ################################################################################
5 ################################################################################
7 TVHEADEND_VERSION
= 7006b9fd88ce0cf54d59399df40fe4ee003c4180
8 TVHEADEND_SITE
= $(call github
,tvheadend
,tvheadend
,$(TVHEADEND_VERSION
))
9 TVHEADEND_LICENSE
= GPLv3
+
10 TVHEADEND_LICENSE_FILES
= LICENSE.md
11 TVHEADEND_DEPENDENCIES
= host-pkgconf
$(if
$(BR2_PACKAGE_PYTHON3
),host-python3
,host-python
) openssl
13 ifeq ($(BR2_PACKAGE_AVAHI
),y
)
14 TVHEADEND_DEPENDENCIES
+= avahi
17 ifeq ($(BR2_PACKAGE_FFMPEG
),y
)
18 TVHEADEND_DEPENDENCIES
+= ffmpeg
19 TVHEADEND_CONF_OPTS
+= --enable-libav
21 TVHEADEND_CONF_OPTS
+= --disable-libav
24 ifeq ($(BR2_PACKAGE_LIBDVBCSA
),y
)
25 TVHEADEND_DEPENDENCIES
+= libdvbcsa
26 TVHEADEND_CONF_OPTS
+= --enable-dvbcsa
28 TVHEADEND_CONF_OPTS
+= --disable-dvbcsa
31 ifeq ($(BR2_PACKAGE_LIBICONV
),y
)
32 TVHEADEND_DEPENDENCIES
+= libiconv
35 TVHEADEND_CFLAGS
= $(TARGET_CFLAGS
)
36 ifeq ($(BR2_PACKAGE_LIBURIPARSER
),y
)
37 TVHEADEND_DEPENDENCIES
+= liburiparser
38 TVHEADEND_CFLAGS
+= $(if
$(BR2_USE_WCHAR
),,-DURI_NO_UNICODE
)
41 TVHEADEND_DEPENDENCIES
+= dtv-scan-tables
43 define TVHEADEND_CONFIGURE_CMDS
45 $(TARGET_CONFIGURE_OPTS
) \
46 $(TARGET_CONFIGURE_ARGS
) \
47 CFLAGS
="$(TVHEADEND_CFLAGS)" \
51 --cpu
="$(BR2_GCC_TARGET_CPU)" \
52 --python
="$(HOST_DIR)/usr/bin/python" \
55 --disable-libffmpeg_static \
56 $(TVHEADEND_CONF_OPTS
) \
60 # The tvheadend build system expects the transponder data to be present inside
61 # its source tree. To prevent a downloaded initiated by the build system just
62 # copy the data files in the right place and add the corresponding stamp file.
63 define TVHEADEND_BUILD_CMDS
64 $(INSTALL
) -d
$(@D
)/data
/dvb-scan
65 cp
-r
$(TARGET_DIR
)/usr
/share
/dvb
/* $(@D
)/data
/dvb-scan
/
66 touch
$(@D
)/data
/dvb-scan
/.stamp
70 define TVHEADEND_INSTALL_TARGET_CMDS
71 $(MAKE
) -C
$(@D
) DESTDIR
="$(TARGET_DIR)" install
74 # Remove documentation and source files that are not needed because we
75 # use the bundled web interface version.
76 define TVHEADEND_CLEAN_SHARE
77 rm -rf
$(TARGET_DIR
)/usr
/share
/tvheadend
/docs
78 rm -rf
$(TARGET_DIR
)/usr
/share
/tvheadend
/src
81 TVHEADEND_POST_INSTALL_TARGET_HOOKS
+= TVHEADEND_CLEAN_SHARE
83 #----------------------------------------------------------------------------
84 # To run tvheadend, we need:
85 # - a startup script, and its config file
86 # - a default DB with a tvheadend admin
87 # - a non-root user to run as
88 define TVHEADEND_INSTALL_DB
89 $(INSTALL
) -D
-m
0600 package
/tvheadend
/accesscontrol
.1 \
90 $(TARGET_DIR
)/home
/tvheadend
/.hts
/tvheadend
/accesscontrol
/1
91 chmod
-R go-rwx
$(TARGET_DIR
)/home
/tvheadend
93 TVHEADEND_POST_INSTALL_TARGET_HOOKS
+= TVHEADEND_INSTALL_DB
95 define TVHEADEND_INSTALL_INIT_SYSV
96 $(INSTALL
) -D package
/tvheadend
/etc.default.tvheadend
$(TARGET_DIR
)/etc
/default
/tvheadend
97 $(INSTALL
) -D package
/tvheadend
/S99tvheadend
$(TARGET_DIR
)/etc
/init.d
/S99tvheadend
100 define TVHEADEND_USERS
101 tvheadend
-1 tvheadend
-1 * /home
/tvheadend
- video TVHeadend daemon
104 $(eval
$(generic-package
))