# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils MY_PN="${PN/-/_}" MY_P="${MY_PN}-${PV}" DESCRIPTION="A Linux GUI for the iRiver iFP flash portable player based on QT" HOMEPAGE="http://ifpgui.sourceforge.net" SRC_URI="mirror://sourceforge/ifpgui/${MY_P}.tar.gz" LICENSE="GPL" SLOT="0" KEYWORDS="~x86" IUSE="doc" DEPEND=">=dev-libs/libusb-0.1.0 >=x11-libs/qt-3.0.0 doc? (>=app-doc/doxygen-1.3.7)" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${P}-doxyfile_fixes.patch } src_compile() { ${QTDIR}/bin/qmake ${S}/ifp_gui.pro \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_RPATH= \ || die "ifp_gui.pro" ${QTDIR}/bin/qmake ${S}/src/src.pro \ QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS}" \ QMAKE_RPATH= \ || die "src.pro" addwrite "${QTDIR}/etc/settings" emake || die "emake failed" use doc && doxygen } src_install() { dodoc README CHANGELOG COPYING dobin bin/ifp_gui use doc && dohtml html/* insinto /usr/share/${PF} doins nonroot.sh } pkg_postinst() { ewarn "If you want to use ifp_gui without root-privileges, you should run " ewarn "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" ewarn "or" ewarn "/usr/share/${PF}/nonroot.sh" ewarn "to add approprate rules to your hotplug scripts" } pkg_config() { ${D}/usr/share/${PF}/nonroot.sh || die "config failed" }