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