# Copyright 1999-2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: 2002/11/10 16:30:21 jmarcet Exp $ inherit flag-o-matic IUSE="lcd mmx oss" DESCRIPTION="Homebrew PVR project for analog TV cards" SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2" HOMEPAGE="http://www.mythtv.org/" SLOT="0" LICENSE="GPL-2" KEYWORDS="x86" DEPEND=">=media-libs/freetype-2.0* media-sound/lame media-libs/a52dec dev-perl/xmltv >=x11-libs/qt-3* dev-db/mysql virtual/x11" src_unpack() { unpack ${A} for i in `grep -lr 'usr/local' "${S}"` do cp -a "${i}" "${i}.orig" sed -e "s:/usr/local:/usr:" "${i}.orig" > "${i}" rm -f "${i}.orig" done } src_compile() { myconf="${myconf} `use_enable lcd`" myconf="${myconf} `use_enable mmx`" myconf="${myconf} `use_enable oss audio-oss`" cpu="`get-flag march`" [ -n "${cpu}" ] && { myconf="{$myconf} --cpu=${cpu}" cp -a "${S}/settings.pro" "${S}/settings.pro.orig" sed -e "s:pentiumpro:${cpu}:g" "${S}/settings.pro.orig" > "${S}/settings.pro" rm -f "${S}/settings.pro.orig" } econf \ ${myconf} \ --enable-a52bin \ --enable-shared emake } src_install() { make \ INSTALL_ROOT=${D} \ install || die exeinto /etc/init.d newexe ${FILESDIR}/mythbackend.rc6 mythbackend insinto /etc/conf.d newins ${FILESDIR}/mythbackend.conf mythbackend exeinto /usr/share/${PN} doexe ${S}/setup/setup dodir /usr/share/${PN}/database insinto /usr/share/${PN}/database doins ${S}/database/* dodoc AUTHORS COPYING FAQ README UPGRADING } pkg_postinst() { einfo "If this is the first time you install MythTV," einfo "you need to add /usr/share/mythtv/database/mc.sql" einfo "to your mysql database." einfo einfo "You might run 'mysql < /usr/share/mythtv/database/mc.sql'" einfo einfo "If you're not in the US/Canada, you need to edit" einfo "/usr/share/mythtv/settings.txt and edit at least the very" einfo "first setting -- XMLTVGrab. Change this to the appropriate" einfo "xmltv grabber." einfo einfo "Next, you need to run the /usr/share/mythtv/setup program." einfo "It will ask you some questions about your hardware, and" einfo "then run xmltv's grabber to configure your channels." einfo einfo "If you're upgrading from an older version and for more" einfo "setup and usage instructions, please refer to" einfo "/usr/share/mythtv/README.gz" }