/[gentoo-x86]/media-tv/freevo/freevo-1.5.4-r1.ebuild
Gentoo

Contents of /media-tv/freevo/freevo-1.5.4-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed Oct 25 13:45:00 2006 UTC (14 years, 1 month ago) by mattepiu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
removed as -r2 is fixed version.
(Portage version: 2.1.2_pre3-r8)
 (Unsigned Manifest commit)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-tv/freevo/freevo-1.5.4-r1.ebuild,v 1.1 2006/10/19 16:48:32 mattepiu Exp $
4
5 inherit distutils
6
7 IUSE="matrox dvd encode lirc X nls"
8 DESCRIPTION="Digital video jukebox (PVR, DVR)."
9 HOMEPAGE="http://www.freevo.org/"
10 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
11 RESTRICT="nomirror"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~ppc ~x86"
16
17 DEPEND=">=dev-python/pygame-1.5.6
18 >=dev-python/imaging-1.1.3
19 >=dev-python/pyxml-0.8.2
20 >=dev-python/twisted-2
21 >=dev-python/twisted-web-0.5.0-r1
22 >=dev-python/mmpython-0.4.5
23 >=media-video/mplayer-0.92
24 >=media-libs/freetype-2.1.4
25 >=media-libs/libsdl-1.2.5
26 >=sys-apps/sed-4
27 dvd? ( >=media-video/xine-ui-0.9.22 >=media-video/lsdvd-0.10 )
28 encode? ( >=media-sound/cdparanoia-3.9.8 >=media-sound/lame-3.93.1 )
29 matrox? ( >=media-video/matroxset-0.3 )
30 lirc? ( app-misc/lirc >=dev-python/pylirc-0.0.3 )"
31
32 src_unpack() {
33 unpack ${A}
34 cp "${FILESDIR}/freevo.rc6" "${WORKDIR}/"
35 if use X ; then
36 sed -e 's/lircd/lircd xdm/g' "${WORKDIR}/freevo.rc6" > "${WORKDIR}/freevo.rc6b"
37 else
38 sed -e 's/lircd/lircd local/g' "${WORKDIR}/freevo.rc6" > "${WORKDIR}/freevo.rc6b"
39 fi
40 }
41
42 src_install() {
43 distutils_src_install
44
45 insinto /etc/freevo
46 doins "${T}/freevo.conf"
47 newins local_conf.py.example local_conf.py
48
49 if [ "${PROFILE_ARCH}" == "xbox" ]; then
50 sed -i -e "s/# MPLAYER_AO_DEV.*/MPLAYER_AO_DEV='alsa1x'/" ${D}/etc/freevo/local_conf.py
51 newins ${FILESDIR}/xbox-lircrc lircrc
52 fi
53
54 if use X; then
55 echo "#!/bin/bash" > freevo
56 echo "/usr/bin/freevoboot startx" >> freevo
57 exeinto /etc/X11/Sessions/
58 doexe freevo
59
60 KDFREEVO=`kde-config --prefix`
61 if [ "x$KDFREEVO" != "x" ]; then
62 FREEVOSESSION=`grep ^SessionsDirs= ${KDFREEVO}/share/config/kdm/kdmrc | cut -d= -f 2 | cut -d: -f1`
63 if [ "x${FREEVOSESSION}" != "x" ]; then
64 insinto ${FREEVOSESSION}
65 doins ${FILESDIR}/freevo.desktop freevo.desktop
66 fi
67 fi
68
69 insinto /etc/X11/dm/Sessions
70 doins ${FILESDIR}/freevo.desktop freevo.desktop
71 fi
72
73 exeinto /usr/bin
74 newexe "${WORKDIR}/freevo.boot" freevoboot
75 insinto /etc/conf.d
76 newins "${FILESDIR}/freevo.conf" freevo
77
78 rm -rf "${D}/usr/share/doc"
79 newdoc Docs/README README.docs
80 dodoc BUGS COPYING ChangeLog FAQ INSTALL PKG-INFO README TODO \
81 Docs/{CREDITS,NOTES,plugins/*.txt}
82 cp -r Docs/{installation,plugin_writing} "${D}/usr/share/doc/${PF}"
83
84 use nls || rm -rf ${D}/usr/share/locale
85 }
86
87 pkg_postinst() {
88 einfo "If you want to schedule programs, emerge xmltv now."
89 echo
90
91 einfo "Please check /etc/freevo/freevo.conf and"
92 einfo "/etc/freevo/local_conf.py before starting Freevo."
93 einfo "To rebuild freevo.conf with different parameters,"
94 einfo "please run:"
95 einfo " freevo setup"
96 echo
97
98 if [ -e "${ROOT}/etc/init.d/freevo" ] ; then
99 ewarn "Please remove ${ROOT}/etc/init.d/freevo because is no longer used"
100 ewarn "and runnining freevo as root could be a security risk"
101 fi
102 echo
103 ewarn "Freevo starting for freevo only system is changed, cause"
104 ewarn "initscript would run it as root and this may cause unsecurity."
105 ewarn "That is now substituted with freevoboot, a wrapper to be runned"
106 ewarn "as user. Configuration is still in /etc/conf.d/freevo"
107 echo
108 if use X ; then
109 ewarn "If you're using a Freevo-only system with X, you'll need"
110 ewarn " to setup the autologin (as user) and choose freevo as"
111 ewarn "default session. If you need to run recordserver/webserver"
112 ewarn "at boot, please use /etc/conf.d/freevo as always."
113 echo
114 ewarn "Should you decide to personalize your freevo.desktop"
115 ewarn "session, keep inside /usr/bin/freevoboot startx (wrapper)."
116 echo
117 else
118 ewarn "Freevo initscript is changed and should not be run as root"
119 echo
120 ewarn "If you want Freevo to start automatically,you'll need"
121 ewarn "to follow instructions at :"
122 ewarn "http://freevo.sourceforge.net/cgi-bin/doc/BootFreevo"
123 echo
124 ewarn "*NOTE: you can use mingetty or provide a login"
125 ewarn "program for getty to autologin as limited privileges user"
126 ewarn "a tutorial for getty is at:"
127 ewarn "http://ubuntuforums.org/showthread.php?t=152274"
128 echo
129 ewarn "Sorry for the disadvantage, this is done for bug #150568."
130 echo
131 fi
132
133 if [ -e "${ROOT}/etc/init.d/freevo" ] ; then
134 ewarn "Please remove ${ROOT}/etc/init.d/freevo as is a security"
135 ewarn "threat. To set autostart read above."
136 fi
137
138 if [ -e "${ROOT}/opt/freevo" ] ; then
139 ewarn "Please remove ${ROOT}/opt/freevo because it is no longer used."
140 fi
141 if [ -e "${ROOT}/etc/freevo/freevo_config.py" ] ; then
142 ewarn "Please remove ${ROOT}/etc/freevo/freevo_config.py."
143 fi
144 if [ -e "${ROOT}/etc/init.d/freevo-record" ] ; then
145 ewarn "Please remove ${ROOT}/etc/init.d/freevo-record"
146 fi
147 if [ -e "${ROOT}/etc/init.d/freevo-web" ] ; then
148 ewarn "Please remove ${ROOT}/etc/init.d/freevo-web"
149 fi
150
151 local myconf
152 if [ "`/bin/ls -l /etc/localtime | grep -e "Europe\|GMT"`" ] ; then
153 myconf="${myconf} --tv=pal"
154 fi
155 if [ "${PROFILE_ARCH}" == "xbox" ]; then
156 myconf="${myconf} --geometry=640x480 --display=x11"
157 elif use matrox ; then
158 myconf="${myconf} --geometry=768x576 --display=mga"
159 elif use X ; then
160 myconf="${myconf} --geometry=800x600 --display=x11"
161 else
162 myconf="${myconf} --geometry=800x600 --display=fbdev"
163 fi
164
165 "/usr/bin/freevo" setup ${myconf} || die "configure problem"
166 }

  ViewVC Help
Powered by ViewVC 1.1.20