This repository has been archived by the owner on Feb 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
133 lines (104 loc) · 4.2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
#
# Copyright (C) 2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=tvheadend
PKG_REV:=9247faa7af042d8c37d8e8065c6389c62da7b66d
PKG_VERSION:=3.3
PKG_RELEASE:=alpha
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_REV).tar.bz2
PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/tvheadend
SECTION:=multimedia
CATEGORY:=Multimedia
DEPENDS:=$(ICONV_DEPENDS) +libopenssl +librt
TITLE:=Tvheadend is a TV streaming server for Linux
URL:=https://www.lonelycoder.com/hts/tvheadend_overview.html
endef
define Package/tvheadend/description
Tvheadend is a TV streaming server for Linux supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as input sources.
It also comes with a powerful and easy to use web interface both used for configuration and day-to-day operations,
such as searching the EPG and scheduling recordings.
Even so, the most notable feature of Tvheadend is how easy it is to set up: Install it, navigate to the web user interface,
drill into the TV adapters tab, select your current location and Tvheadend will start scanning channels and present them to you in just
a few minutes
endef
define Package/tvheadend/config
menu "Configuration"
depends on PACKAGE_tvheadend
source "$(SOURCE)/Config.in"
endmenu
endef
ifeq ($(CONFIG_TVHEADEND_CWC_SUPPORT),)
CONFIGURE_ARGS += --disable-cwc
endif
ifeq ($(CONFIG_TVHEADEND_V4L_SUPPORT),)
CONFIGURE_ARGS += --disable-v4l
endif
ifeq ($(CONFIG_TVHEADEND_LINUXDVB_SUPPORT),)
CONFIGURE_ARGS += --disable-linuxdvb
endif
ifeq ($(CONFIG_TVHEADEND_DVBSCAN_SUPPORT),)
CONFIGURE_ARGS += --disable-dvbscan
endif
ifeq ($(CONFIG_TVHEADEND_AVAHI_SUPPORT),)
CONFIGURE_ARGS += --disable-avahi
else
CONFIGURE_ARGS += --enable-avahi
endif
ifeq ($(CONFIG_TVHEADEND_DVBCSA_SUPPORT),)
CONFIGURE_ARGS += --disable-dvbcsa
else
CONFIGURE_ARGS += --enable-dvbcsa
endif
CONFIGURE_ARGS += \
--release \
--enable-bundle
TARGET_LDFLAGS += \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-liconv
define Build/Configure
#remove unused resources
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/images/yourtheme
$(RM) $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/yourtheme.css
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/images/access
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/theme-access
$(RM) $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/xtheme-access.css
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/images/gray
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/theme-gray
$(RM) $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/xtheme-gray.css
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/images/vista
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/structure
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/visual
$(RM) $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/README.txt
$(RM) $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/xtheme-blue.css
$(RM) $(PKG_BUILD_DIR)/src/webui/static/extjs/resources/css/ext-all-notheme.css
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/adapter/ext/ext-base-debug.js
$(RM) -r $(PKG_BUILD_DIR)/src/webui/static/extjs/ext-all-debug.js
$(CP) $(PKG_BUILD_DIR)/docs/docresources/tvheadendlogo.png $(PKG_BUILD_DIR)/src/webui/static/img
$(call Build/Configure/Default)
endef
define Package/tvheadend/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/tvheadend.init $(1)/etc/init.d/tvheadend
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build.linux/tvheadend $(1)/usr/bin/
endef
define Package/tvheadend/prerm
#!/bin/sh
# check if we are on real system
if [ -z "$${IPKG_INSTROOT}" ]; then
echo "Stopping tvheadend"
/etc/init.d/tvheadend stop
fi
exit 0
endef
$(eval $(call BuildPackage,tvheadend))