# 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 $ S=${WORKDIR}/${P} 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" # media-libs/xmltv # ebuild not done yet src_unpack() { local MARCH_FLAG="" unpack ${A} for i in `grep -l -r 'usr/local' ${S}` do cp -a ${i} ${i}.orig sed -e "s:\/usr\/local:\/usr:" ${i}.orig > ${i} rm -f ${i}.orig done for x in ${CFLAGS} do if [ "${x/march}" != "${x}" ] then MARCH_FLAG="${x/-march=}" break fi done for i in ${S}/settings.pro do cp -a ${i} ${i}.orig sed -e "s:pentiumpro:${MARCH_FLAG}:" ${i}.orig > ${i} rm -f ${i}.orig done } src_compile() { econf \ --prefix=/usr \ --enable-a52bin \ --enable-shared || die make || die } src_install() { make \ INSTALL_ROOT=${D} \ install || die 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" }