]> Pileus Git - ~andy/sunrise/blob - media-tv/pytivo-wmcbrine/pytivo-wmcbrine-20091112.ebuild
net-misc/anytun: changed indentation to tabs on request.
[~andy/sunrise] / media-tv / pytivo-wmcbrine / pytivo-wmcbrine-20091112.ebuild
1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="2"
6
7 inherit eutils multilib python
8
9 DESCRIPTION="An HMO and GoBack server for Tivo."
10 HOMEPAGE="http://pytivo.sourceforge.net/"
11 SRC_URI="http://omploader.org/vMnV5aQ/pytivo-wmcbrine-20091112.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 DEPEND="dev-lang/python"
19 RDEPEND="${DEPEND}
20         media-video/ffmpeg"
21
22 S="${WORKDIR}/wmcbrine"
23
24 pkg_setup() {
25         enewgroup pytivo
26         enewuser pytivo -1 -1 -1 pytivo
27 }
28
29 src_install() {
30         MY_LIBDIR="/usr/$(get_libdir)/${PN}"
31
32         insinto $MY_LIBDIR
33         doins *.py *.pyw  || die "Install failed"
34         doins -r Cheetah mutagen plugins templates xmpp || die "Install failed"
35
36         fperms 0755 ${MY_LIBDIR}/pyTivo.py || die "Cannot set permissions"
37
38         newinitd "${FILESDIR}"/pyTivo.initd.sh pytivo \
39                 || die "Cannot create init.d launcher"
40
41         dodoc README || die "Cannot install docs"
42         newdoc pyTivo.conf.dist pyTivo.conf || die "Cannot install docs"
43
44         dosym ${MY_LIBDIR}/pyTivo.py /usr/bin/pytivo \
45                 || die "Cannot create symlink to launcher"
46 }
47
48 pkg_postinst() {
49         ewarn "You must setup /etc/pyTivo.conf before pyTivo can be started. A"
50         ewarn "sample configuration file pyTivo.conf is available in"
51         ewarn "/usr/share/doc/${PF}"
52         ewarn
53
54         elog "pyTivo can be run as a normal user or it can be started"
55         elog "automatically by adding pytivo to the default runlevel by"
56         elog "  # rc-update add pytivo default"
57         elog "as root."
58 }