package zxlhhyccc: update

This commit is contained in:
CN_SZTL 2019-08-05 17:18:40 +08:00
parent 08fdf3fc45
commit b7bc34de7b
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
7 changed files with 232 additions and 140 deletions

View File

@ -0,0 +1,17 @@
config TVHEADEND_NDMS_CWC_SUPPORT
bool "NewCamd support"
default y
config TVHEADEND_NDMS_LINUXDVB_SUPPORT
bool "Linux DVB support"
default y
config TVHEADEND_NDMS_DVBSCAN_SUPPORT
bool "Fetch DVB-scan data"
depends on TVHEADEND_NDMS_LINUXDVB_SUPPORT
default TVHEADEND_NDMS_LINUXDVB_SUPPORT
config TVHEADEND_NDMS_AVAHI_SUPPORT
bool "Avahi client support"
select PACKAGE_libavahi-client
default n

131
package/zxlhhyccc/Makefile Normal file
View File

@ -0,0 +1,131 @@
#
# Copyright (C) 2015 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_VERSION:=4.3
PKG_RELEASE:=1
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=d91f71cfbe0016350dbb3853a42ac4b226d8d47b
# This is stable git version...
# PKG_SOURCE_VERSION:=1a0262f5870e4fabd6b9c70a7bf2ebe420bc956e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/505575853/tvheadend.git
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-3.0
PKG_LICENSE_FILES:=LICENSE.md
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
SHORT_GIT_VER:=$(shell echo $(PKG_SOURCE_VERSION) | cut -b -7)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
define Package/tvheadend
SECTION:=multimedia
CATEGORY:=Multimedia
TITLE:=Tvheadend is a TV streaming server for Linux
DEPENDS:=+libopenssl +librt +zlib +libpcre +libpcre2 +libdvbcsa +TVHEADEND_AVAHI_SUPPORT:libavahi-client $(ICONV_DEPENDS)
URL:=https://tvheadend.org
MAINTAINER:=Jan Čermák <jan.cermak@nic.cz>
endef
define Package/tvheadend/description
Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
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_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
CONFIGURE_ARGS += \
--arch=$(ARCH) \
--disable-dbus_1 \
--disable-libav \
--enable-bundle \
--enable-dvben50221 \
--enable-tvhcsa \
--enable-dvbcsa \
--enable-inotify \
--enable-epoll \
--enable-trace \
--nowerror \
--disable-dvbscan \
--disable-avahi \
--disable-hdhomerun_static \
--disable-pie \
--disable-imagecache \
--disable-ffmpeg_static \
--disable-libx264 \
--disable-libx264_static \
--disable-libx265 \
--disable-libx265_static \
--disable-libvpx \
--disable-libvpx_static \
--disable-libtheora \
--disable-libtheora_static \
--disable-libvorbis \
--disable-libvorbis_static \
--disable-libfdkaac \
--disable-libfdkaac_static \
--disable-nvenc \
--disable-libmfx_static \
--disable-timeshift
define Build/Prepare
$(call Build/Prepare/Default)
echo 'Tvheadend $(shell echo $(PKG_VERSION)~$(SHORT_GIT_VER)-$(PKG_RELEASE))' \
> $(PKG_BUILD_DIR)/debian/changelog
endef
define Package/conffiles
/etc/config/tvheadend
endef
define Package/tvheadend/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/tvheadend.init $(1)/etc/init.d/tvheadend
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/tvheadend.config $(1)/etc/config/tvheadend
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/build.linux/tvheadend $(1)/usr/bin/
endef
$(eval $(call BuildPackage,tvheadend))

View File

@ -1,58 +0,0 @@
# Copyright (C) 2019 Lucian Cristian <lucian.cristian@gmail.com>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
include $(TOPDIR)/rules.mk
PKG_NAME:=libpciaccess
PKG_VERSION:=0.14
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://www.x.org/releases/individual/lib/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_HASH:=3df543e12afd41fea8eac817e48cbfde5aed8817b81670a4e9e493bb2f5bf2a4
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:= Lucian Cristian <lucian.cristian@gmail.com>
include $(INCLUDE_DIR)/package.mk
define Package/libpciaccess
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Generic PCI access library
URL:=https://xorg.freedesktop.org/
endef
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
CONFIGURE_ARGS += \
--prefix=/usr
define Build/InstallDev
$(INSTALL_DIR) \
$(1)/usr/include \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/include/* \
$(1)/usr/include/
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/{pkgconfig,*.so*} \
$(1)/usr/lib/
endef
define Package/libpciaccess/install
$(INSTALL_DIR) \
$(1)/usr/lib
$(CP) \
$(PKG_INSTALL_DIR)/usr/lib/*.so* \
$(1)/usr/lib/
endef
$(eval $(call BuildPackage,libpciaccess))

View File

@ -1,28 +0,0 @@
From b6df5202306bd71158b482f25ca2e6919645d4dd Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 4 Jun 2015 20:55:06 -0700
Subject: [PATCH 4/4] Don't include sys/io.h on arm
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
src/linux_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/linux_sysfs.c b/src/linux_sysfs.c
index 3f95e53..1e3aad3 100644
--- a/src/linux_sysfs.c
+++ b/src/linux_sysfs.c
@@ -50,7 +50,7 @@
#include <dirent.h>
#include <errno.h>
-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__)
+#if defined(__i386__) || defined(__x86_64__)
#include <sys/io.h>
#else
#define inb(x) -1
--
2.1.4

View File

@ -1,54 +0,0 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=librouteros
PKG_SOURCE_DATE:=2018-07-19
PKG_SOURCE_VERSION:=c485c777ffbbbd87c3d72d843af36ba016803cae
PKG_RELEASE:=1
PKG_MAINTAINER:=Sven Roederer <devel-sven@geroedel.de>
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=COPYING
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/octo/librouteros/tar.gz/$(PKG_SOURCE_VERSION)?
PKG_HASH:=427e071fe270ff6c08e32a10e5beff2add4205e6c864b142f950efdb8d2245a4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/librouteros
TITLE:=A library that talks to MikroTik devices.
URL:=https://octo.github.io/librouteros/
SECTION:=libs
CATEGORY:=Libraries
endef
define Package/librouteros/description
librouteros is a library to communicate with RouterOS, the operating system of MikroTik's RouterBoards.
It uses the API port provided by those systems to connect and talk to the devices. librouteros is a
low-level library in that it abstracts the network protocol used but has next to no knowledge about the
commands and responses available
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/routeros_*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.{a,la,so*} $(1)/usr/lib/
endef
define Package/librouteros/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/librouteros.so.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,librouteros))

View File

@ -0,0 +1,13 @@
#config tvheadend service
# option nosyslog '0'
# option use_temp_epgdb '0'
# option config_path '/etc/tvheadend'
config tvheadend server
option ipv6 '1'
# option bindaddr '0.0.0.0'
# option http_port '9981'
# option http_root '/tvheadend'
# option htsp_port '9982'
# option htsp_port2 '9983'
# option xspf '0'

View File

@ -0,0 +1,71 @@
#!/bin/sh /etc/rc.common
START=99
STOP=00
USE_PROCD=1
PROG=/usr/bin/tvheadend
TEMP_CONFIG=/tmp/tvheadend
PERSISTENT_CONFIG=/etc/tvheadend
execute_first_run() {
"$PROG" -C "$1" -B -C -A >/dev/null 2>&1
}
ensure_config_exists() {
local config_path
config_load tvheadend
config_get config_path service config_path
if [ -z "$config_path" ]; then
[ -d "$PERSISTENT_CONFIG" ] || execute_first_run "$PERSISTENT_CONFIG"
else
# if the configuration directory is empty, empty config with grant-all ACL is created
[ -d "$config_path" ] && [ "$(ls -A $config_path)" ] || execute_first_run "$config_path"
fi
# if use_temp_epgdb is enabled (default), most of the config is put to config_path
# (or /etc/config), except for epgdb.v2, which grows quite large and is write-heavy,
# so it's put into volatile tmpfs
# epgdb.v2 is created and symlinked to main config dir upon each start (if it doesn't exist)
config_get_bool use_temp_epgdb service use_temp_epgdb 1
if [ "$use_temp_epgdb" == "1" ]; then
TEMP_EPG="${TEMP_CONFIG}/epgdb.v2"
[ ! -f "$TEMP_EPG" ] && mkdir -p "$TEMP_CONFIG" && touch "$TEMP_EPG" && chmod 700 "$TEMP_EPG"
[ -z "$config_path" ] && config_path="$PERSISTENT_CONFIG"
ln -sf "$TEMP_EPG" "${config_path}/epgdb.v2"
fi
}
load_uci_config() {
config_load tvheadend
config_get config_path service config_path "$PERSISTENT_CONFIG"
[ -n "$config_path" ] && procd_append_param command -c "$config_path"
config_get_bool nosyslog service nosyslog 0
[ "$nosyslog" -eq 1 ] && procd_append_param command --nosyslog
config_get_bool ipv6 server ipv6 0
[ "$ipv6" -eq 1 ] && procd_append_param command --ipv6
config_get bindaddr server bindaddr
[ -n "$bindaddr" ] && procd_append_param command --bindaddr "$bindaddr"
config_get http_port server http_port
[ -n "$http_port" ] && procd_append_param command --http_port "$http_port"
config_get http_root server http_root
[ -n "$http_root" ] && procd_append_param command --http_root "$http_root"
config_get htsp_port server htsp_port
[ -n "$htsp_port" ] && procd_append_param command --htsp_port "$htsp_port"
config_get htsp_port2 server htsp_port2
[ -n "$htsp_port2" ] && procd_append_param command --htsp_port "$htsp_port2"
config_get xspf server xspf 0
[ "$xspf" -eq 1 ] && procd_append_param command --xspf
}
start_service() {
ensure_config_exists
procd_open_instance
procd_set_param file /etc/config/tvheadend
procd_set_param command "$PROG" -B -C
load_uci_config
procd_close_instance
}