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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Dec 1 21:04:50 2007 UTC (12 years, 11 months ago) by rbu
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Version bump (bug #199580)
(Portage version: 2.1.3.19)

1 # Copyright 1999-2007 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-r2.ebuild,v 1.6 2007/11/27 11:14:27 zzam 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="mirror"
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 dvd? ( >=media-video/xine-ui-0.9.22 >=media-video/lsdvd-0.10 )
27 encode? ( >=media-sound/cdparanoia-3.9.8 >=media-sound/lame-3.93.1 )
28 matrox? ( >=media-video/matroxset-0.3 )
29 lirc? ( app-misc/lirc >=dev-python/pylirc-0.0.3 )"
30 RDEPEND="${DEPEND}"
31
32 pkg_setup() {
33 if ! built_with_use media-libs/sdl-image png; then
34 eerror "media-libs/sdl-image must be emerged with the 'png' use flag"
35 eerror "Please fix and re-emerge freevo."
36 die "fix use flags"
37 fi
38 }
39
40 src_unpack() {
41 unpack ${A}
42 cp "${FILESDIR}/freevo.rc6" "${WORKDIR}/"
43 if use X ; then
44 sed -e 's/lircd/lircd xdm/g' "${WORKDIR}/freevo.rc6" > "${WORKDIR}/freevo.rc6b"
45 else
46 sed -e 's/lircd/lircd local/g' "${WORKDIR}/freevo.rc6" > "${WORKDIR}/freevo.rc6b"
47 fi
48 }
49
50 src_install() {
51 distutils_src_install
52
53 insinto /etc/freevo
54 doins "${T}/freevo.conf"
55 newins local_conf.py.example local_conf.py
56
57 if [ "${PROFILE_ARCH}" == "xbox" ]; then
58 sed -i -e "s/# MPLAYER_AO_DEV.*/MPLAYER_AO_DEV='alsa1x'/" "${D}"/etc/freevo/local_conf.py
59 newins "${FILESDIR}"/xbox-lircrc lircrc
60 fi
61
62 if use X; then
63 echo "#!/bin/bash" > freevo
64 echo "/usr/bin/freevoboot startx" >> freevo
65 exeinto /etc/X11/Sessions/
66 doexe freevo
67
68 KDFREEVO=`kde-config --prefix`
69 if [ "x$KDFREEVO" != "x" ]; then
70 FREEVOSESSION=`grep ^SessionsDirs= ${KDFREEVO}/share/config/kdm/kdmrc | cut -d= -f 2 | cut -d: -f1`
71 if [ "x${FREEVOSESSION}" != "x" ]; then
72 insinto ${FREEVOSESSION}
73 doins "${FILESDIR}"/freevo.desktop freevo.desktop
74 fi
75 fi
76
77 insinto /etc/X11/dm/Sessions
78 doins "${FILESDIR}"/freevo.desktop freevo.desktop
79 fi
80
81 exeinto /usr/bin
82 newexe "${FILESDIR}/freevo.boot" freevoboot
83 newconfd "${FILESDIR}/freevo.conf" freevo
84
85 rm -rf "${D}/usr/share/doc"
86 newdoc Docs/README README.docs
87 dodoc BUGS COPYING ChangeLog FAQ INSTALL PKG-INFO README TODO \
88 Docs/{CREDITS,NOTES,plugins/*.txt}
89 cp -r Docs/{installation,plugin_writing} "${D}/usr/share/doc/${PF}"
90
91 use nls || rm -rf "${D}"/usr/share/locale
92 }
93
94 pkg_postinst() {
95 elog "If you want to schedule programs, emerge xmltv now."
96 elog
97
98 elog "Please check /etc/freevo/freevo.conf and"
99 elog "/etc/freevo/local_conf.py before starting Freevo."
100 elog "To rebuild freevo.conf with different parameters,"
101 elog "please run:"
102 elog " freevo setup"
103 elog
104
105 if [ -e "${ROOT}/etc/init.d/freevo" ] ; then
106 ewarn "Please remove ${ROOT}/etc/init.d/freevo because is no longer used"
107 ewarn "and runnining freevo as root could be a security risk"
108 fi
109 ewarn
110 ewarn "Freevo starting method for freevo-only-systems is changed, cause"
111 ewarn "initscript would run it as root and this may cause unsecurity."
112 ewarn "That is now substituted with freevoboot, a wrapper to be runned"
113 ewarn "as user. Configuration is still in /etc/conf.d/freevo"
114 ewarn "and you can always use freevo directly."
115 ewarn
116 if use X ; then
117 ewarn "If you're using a Freevo-only system with X, you'll need"
118 ewarn " to setup the autologin (as user) and choose freevo as"
119 ewarn "default session. If you need to run recordserver/webserver"
120 ewarn "at boot, please use /etc/conf.d/freevo as always."
121 ewarn
122 ewarn "Should you decide to personalize your freevo.desktop"
123 ewarn "session, keep inside /usr/bin/freevoboot startx (wrapper)."
124 ewarn
125 else
126 ewarn "Freevo initscript is changed and should not be run as root"
127 ewarn
128 ewarn "If you want Freevo to start automatically,you'll need"
129 ewarn "to follow instructions at :"
130 ewarn "http://freevo.sourceforge.net/cgi-bin/doc/BootFreevo"
131 ewarn
132 ewarn "*NOTE: you can use mingetty or provide a login"
133 ewarn "program for getty to autologin as limited privileges user"
134 ewarn "a tutorial for getty is at:"
135 ewarn "http://ubuntuforums.org/showthread.php?t=152274"
136 ewarn
137 ewarn "Sorry for the disadvantage, this is done for bug #150568."
138 ewarn
139 fi
140
141 if [ -e "${ROOT}/etc/init.d/freevo" ] ; then
142 ewarn "Please remove ${ROOT}/etc/init.d/freevo as is a security"
143 ewarn "threat. To set autostart read above."
144 fi
145
146 if [ -e "${ROOT}/opt/freevo" ] ; then
147 ewarn "Please remove ${ROOT}/opt/freevo because it is no longer used."
148 fi
149 if [ -e "${ROOT}/etc/freevo/freevo_config.py" ] ; then
150 ewarn "Please remove ${ROOT}/etc/freevo/freevo_config.py."
151 fi
152 if [ -e "${ROOT}/etc/init.d/freevo-record" ] ; then
153 ewarn "Please remove ${ROOT}/etc/init.d/freevo-record"
154 fi
155 if [ -e "${ROOT}/etc/init.d/freevo-web" ] ; then
156 ewarn "Please remove ${ROOT}/etc/init.d/freevo-web"
157 fi
158
159 local myconf
160 if [ "`/bin/ls -l /etc/localtime | grep -e "Europe\|GMT"`" ] ; then
161 myconf="${myconf} --tv=pal"
162 fi
163 if [ "${PROFILE_ARCH}" == "xbox" ]; then
164 myconf="${myconf} --geometry=640x480 --display=x11"
165 elif use matrox ; then
166 myconf="${myconf} --geometry=768x576 --display=mga"
167 elif use X ; then
168 myconf="${myconf} --geometry=800x600 --display=x11"
169 else
170 myconf="${myconf} --geometry=800x600 --display=fbdev"
171 fi
172
173 "/usr/bin/freevo" setup ${myconf} || die "configure problem"
174 }

  ViewVC Help
Powered by ViewVC 1.1.20