# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils qt3 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-2" SLOT="0" KEYWORDS="~x86" IUSE="doc" DEPEND=">=sys-apps/sed-4 >=dev-libs/libusb-0.1.0 $(qt_min_version 3.3) doc? (>=app-doc/doxygen-1.3.7)" RDEPEND="app-misc/ifp-line $(qt_min_version 3.3) >=dev-libs/libusb-0.1.0" S="${WORKDIR}/${MY_P}" src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/${PN}-doxyfile_fixes.patch # version number haven't changed in Doxygen file since # version 0.6.1 - better sed this, since it's very probable # that this is not going to be change in future releases sed -i -e '/PROJECT_NUMBER/ s/0.6.1/'${PV}'/' Doxyfile } 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() { newbin bin/${MY_PN} ${PN} dodoc README CHANGELOG COPYING 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() { ${ROOT}/usr/share/${PF}/nonroot.sh || die "config failed" }