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

Contents of /media-tv/freevo/freevo-1.6.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20