# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" inherit eutils toolchain-funcs user DESCRIPTION="A combined DVB receiver, Digital Video Recorder and Live TV streaming server" HOMEPAGE="https://www.lonelycoder.com/redmine/projects/tvheadend/" SRC_URI="https://github.com/downloads/${PN}/${PN}/${P}.tar.gz" LICENSE="GPL-3" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="avahi xmltv" #TODO:cwc and linuxdvb could also be optional, but are broken upstream. Check again with 3.4 DEPEND="dev-libs/openssl sys-libs/zlib virtual/linuxtv-dvb-headers avahi? ( net-dns/avahi )" RDEPEND="${DEPEND} xmltv? ( media-tv/xmltv )" DOCS=( README ) pkg_setup() { enewuser tvheadend -1 -1 /dev/null video } src_prepare() { # set version number to avoid git dependency sed -i \ -e "s:tvheadend (3.*) unstable:tvheadend (${PV}) unstable$:" \ debian/changelog|| die "sed failed!" #remove -Werror from make flags sed -i 's:-Werror::' Makefile || die "sed failed!" } src_configure() { econf \ --prefix="${EPREFIX}"/usr \ --datadir="${EPREFIX}"/usr/share/"${PN}" \ --mandir="${EPREFIX}"/usr/share/man/man1 \ --enable-zlib \ --release \ --disable-dvbscan \ $(use_enable avahi) \ } src_compile() { emake CC="$(tc-getCC)" DESTDIR="${D}" } src_install() { default newinitd "${FILESDIR}/tvheadend.initd" tvheadend newconfd "${FILESDIR}/tvheadend.confd" tvheadend dodir /etc/tvheadend fperms 0600 /etc/tvheadend fowners tvheadend:video /etc/tvheadend } pkg_postinst() { elog "To start Tvheadend:" elog "/etc/init.d/tvheadend start" elog elog "To start Tvheadend at boot:" elog "rc-update add tvheadend default" elog elog "Make sure that you change the default username" elog "and password via the Configuration / Access control" elog "tab in the web interface." }