]> Pileus Git - ~andy/sunrise/blob - media-tv/pytivo-wmcbrine/pytivo-wmcbrine-20100808.ebuild
media-tv/pytivo-wmcbrine: Moved media-video/ffmpeg > virtual/ffmpeg, Fixed Python...
[~andy/sunrise] / media-tv / pytivo-wmcbrine / pytivo-wmcbrine-20100808.ebuild
1 # Copyright 1999-2010 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 eutils multilib python
10
11 DESCRIPTION="An HMO and GoBack server for Tivo"
12 HOMEPAGE="http://pytivo.sourceforge.net/"
13 SRC_URI="http://ompldr.org/vNWtudQ/${P}.tar.bz2 -> ${P}.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 DEPEND=""
21 RDEPEND="${DEPEND}
22         virtual/ffmpeg"
23
24 S="${WORKDIR}/wmcbrine"
25
26 pkg_setup() {
27         enewgroup pytivo
28         enewuser pytivo -1 -1 -1 pytivo
29         python_set_active_version 2
30         python_convert_shebangs -r 2 .
31 }
32
33 src_install() {
34         MY_LIBDIR="/usr/$(get_libdir)/${PN}"
35
36         insinto $MY_LIBDIR
37         doins *.py *.pyw  || die "Install failed"
38         doins -r Cheetah mutagen plugins templates xmpp || die "Install failed"
39
40         fperms 0755 ${MY_LIBDIR}/pyTivo.py || die "Cannot set permissions"
41
42         newinitd "${FILESDIR}"/pyTivo.initd.sh pytivo \
43                 || die "Cannot create init.d launcher"
44
45         dodoc README || die "Cannot install docs"
46         newdoc pyTivo.conf.dist pyTivo.conf || die "Cannot install docs"
47
48         dosym ${MY_LIBDIR}/pyTivo.py /usr/bin/pytivo \
49                 || die "Cannot create symlink to launcher"
50 }
51
52 pkg_postinst() {
53         ewarn "You must setup /etc/pyTivo.conf before pyTivo can be started. A"
54         ewarn "sample configuration file pyTivo.conf is available in"
55         ewarn "/usr/share/doc/${PF}"
56         ewarn
57
58         elog "pyTivo can be run as a normal user or it can be started"
59         elog "automatically by adding pytivo to the default runlevel by"
60         elog "  # rc-update add pytivo default"
61         elog "as root."
62 }