# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic IUSE="lcd mmx oss" DESCRIPTION="Homebrew PVR project." HOMEPAGE="http://www.mythtv.org/" SRC_URI="http://www.mythtv.org/mc/${P}.tar.bz2" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" DEPEND=">=x11-libs/qt-3 media-libs/a52dec media-tv/xmltv dev-db/mysql media-sound/lame >=media-libs/freetype-2.0 virtual/x11" RDEPEND="${DEPEND} lcd? ( app-misc/lcdproc )" src_unpack() { unpack ${A} cd "${S}" for i in $(grep -lr usr/local .) ; do sed -i -e "s:usr/local:usr:" "${i}" done epatch "${FILESDIR}/${PN}-gentoo.patch" } src_compile() { local myconf="--enable-a52bin --enable-shared" myconf="${myconf} `use_enable lcd`" myconf="${myconf} `use_enable mmx`" myconf="${myconf} `use_enable oss audio-oss`" cpu="`get-flag march`" if [ -n "${cpu}" ] ; then myconf="${myconf} --cpu=${cpu}" sed -i -e "s:pentiumpro:${cpu}:g" "${S}/settings.pro" fi qmake -o "${S}/Makefile" "${S}/${PN}.pro" econf ${myconf} # doesn't work quite right as a parallel build make || die "emake failed" } src_install() { make INSTALL_ROOT="${D}" install || die "make install failed" dodir /etc/mythtv mv "${D}/usr/share/mythtv/mysql.txt" "${D}/etc/mythtv" keepdir /var/{log,run}/mythtv fowners nobody:nobody /var/{log,run}/mythtv exeinto /etc/init.d newexe "${FILESDIR}/mythbackend.rc6" mythbackend insinto /etc/conf.d newins "${FILESDIR}/mythbackend.conf" mythbackend exeinto /usr/share/mythtv doexe "${FILESDIR}/mythfilldatabase.cron" "setup/setup" insinto /usr/share/mythtv/database doins "${S}"/database/* dodoc AUTHORS COPYING FAQ README UPGRADING keys.txt docs/*.txt dohtml docs/*.html } 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 "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 "Once you have configured your database, you can run" einfo "/usr/bin/mythfilldatabase to populate the schedule" einfo "or copy /usr/share/mythtv/mythfilldatabase.cron to" einfo "/etc/cron.daily for this to happen automatically." einfo einfo "If you're upgrading from an older version and for more" einfo "setup and usage instructions, please refer to:" einfo " /usr/share/doc/${PF}/README.gz" einfo " /usr/share/doc/${PF}/UPGRADING.gz" }