You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
2.9 KiB
121 lines
2.9 KiB
6 years ago
|
# Copyright 1999-2019 Gentoo Authors
|
||
8 years ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
6 years ago
|
EAPI=7
|
||
8 years ago
|
|
||
7 years ago
|
inherit linux-info systemd toolchain-funcs user
|
||
8 years ago
|
|
||
|
DESCRIPTION="Tvheadend is a TV streaming server and digital video recorder"
|
||
|
HOMEPAGE="https://tvheadend.org/"
|
||
7 years ago
|
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||
8 years ago
|
|
||
|
LICENSE="GPL-3"
|
||
|
SLOT="0"
|
||
7 years ago
|
KEYWORDS="~amd64 ~arm ~x86"
|
||
8 years ago
|
|
||
7 years ago
|
IUSE="+capmt +constcw +cwc dbus debug dvbcsa dvben50221 +dvb +ffmpeg hdhomerun +imagecache +inotify iptv libressl satip systemd +timeshift uriparser xmltv zeroconf zlib"
|
||
8 years ago
|
|
||
6 years ago
|
BDEPEND="
|
||
|
sys-devel/gettext
|
||
|
virtual/pkgconfig"
|
||
|
|
||
7 years ago
|
RDEPEND="
|
||
8 years ago
|
virtual/libiconv
|
||
|
dbus? ( sys-apps/dbus )
|
||
7 years ago
|
dvbcsa? ( media-libs/libdvbcsa )
|
||
|
dvben50221? ( media-tv/linuxtv-dvb-apps )
|
||
5 years ago
|
ffmpeg? ( media-video/ffmpeg:0= )
|
||
8 years ago
|
hdhomerun? ( media-libs/libhdhomerun )
|
||
6 years ago
|
!libressl? ( dev-libs/openssl:0= )
|
||
7 years ago
|
libressl? ( dev-libs/libressl:= )
|
||
8 years ago
|
uriparser? ( dev-libs/uriparser )
|
||
8 years ago
|
zeroconf? ( net-dns/avahi )
|
||
8 years ago
|
zlib? ( sys-libs/zlib )"
|
||
|
|
||
7 years ago
|
DEPEND="
|
||
|
${RDEPEND}
|
||
|
dvb? ( virtual/linuxtv-dvb-headers )"
|
||
8 years ago
|
|
||
|
RDEPEND+="
|
||
7 years ago
|
dvb? ( media-tv/dtv-scan-tables )
|
||
8 years ago
|
xmltv? ( media-tv/xmltv )"
|
||
|
|
||
7 years ago
|
REQUIRED_USE="dvbcsa? ( || ( capmt constcw cwc dvben50221 ) )"
|
||
8 years ago
|
|
||
7 years ago
|
# Some patches from:
|
||
|
# https://github.com/rpmfusion/tvheadend
|
||
8 years ago
|
|
||
7 years ago
|
PATCHES=(
|
||
6 years ago
|
"${FILESDIR}"/${PN}-4.0.9-use_system_queue.patch
|
||
|
"${FILESDIR}"/${PN}-4.2.1-hdhomerun.patch
|
||
|
"${FILESDIR}"/${PN}-4.2.2-dtv_scan_tables.patch
|
||
7 years ago
|
)
|
||
8 years ago
|
|
||
7 years ago
|
DOCS=( README.md )
|
||
8 years ago
|
|
||
|
pkg_setup() {
|
||
7 years ago
|
use inotify &&
|
||
|
CONFIG_CHECK="~INOTIFY_USER" linux-info_pkg_setup
|
||
|
|
||
|
enewuser tvheadend -1 -1 /etc/tvheadend video
|
||
8 years ago
|
}
|
||
|
|
||
|
src_configure() {
|
||
7 years ago
|
CC="$(tc-getCC)" \
|
||
7 years ago
|
PKG_CONFIG="${CHOST}-pkg-config" \
|
||
|
econf \
|
||
|
--disable-bundle \
|
||
8 years ago
|
--disable-ccache \
|
||
7 years ago
|
--disable-dvbscan \
|
||
|
--disable-ffmpeg_static \
|
||
8 years ago
|
--disable-hdhomerun_static \
|
||
7 years ago
|
--nowerror \
|
||
8 years ago
|
$(use_enable capmt) \
|
||
|
$(use_enable constcw) \
|
||
|
$(use_enable cwc) \
|
||
|
$(use_enable dbus dbus_1) \
|
||
7 years ago
|
$(use_enable debug trace) \
|
||
8 years ago
|
$(use_enable dvb linuxdvb) \
|
||
7 years ago
|
$(use_enable dvbcsa) \
|
||
|
$(use_enable dvben50221) \
|
||
8 years ago
|
$(use_enable ffmpeg libav) \
|
||
|
$(use_enable hdhomerun hdhomerun_client) \
|
||
|
$(use_enable imagecache) \
|
||
|
$(use_enable inotify) \
|
||
|
$(use_enable iptv) \
|
||
|
$(use_enable satip satip_server) \
|
||
|
$(use_enable satip satip_client) \
|
||
7 years ago
|
$(use_enable systemd libsystemd_daemon) \
|
||
8 years ago
|
$(use_enable timeshift) \
|
||
|
$(use_enable uriparser) \
|
||
8 years ago
|
$(use_enable zeroconf avahi) \
|
||
8 years ago
|
$(use_enable zlib)
|
||
|
}
|
||
|
|
||
|
src_compile() {
|
||
|
emake CC="$(tc-getCC)"
|
||
|
}
|
||
|
|
||
|
src_install() {
|
||
|
default
|
||
|
|
||
7 years ago
|
newinitd "${FILESDIR}"/tvheadend.initd tvheadend
|
||
|
newconfd "${FILESDIR}"/tvheadend.confd tvheadend
|
||
8 years ago
|
|
||
7 years ago
|
use systemd &&
|
||
|
systemd_dounit "${FILESDIR}"/tvheadend.service
|
||
8 years ago
|
|
||
|
dodir /etc/tvheadend
|
||
|
fperms 0700 /etc/tvheadend
|
||
|
fowners tvheadend:video /etc/tvheadend
|
||
|
}
|
||
|
|
||
|
pkg_postinst() {
|
||
|
elog "The Tvheadend web interface can be reached at:"
|
||
|
elog "http://localhost:9981/"
|
||
|
elog
|
||
|
elog "Make sure that you change the default username"
|
||
|
elog "and password via the Configuration / Access control"
|
||
|
elog "tab in the web interface."
|
||
|
}
|