# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="4" PYTHON_DEPEND="2:2.6" inherit eutils python multilib gnome2-utils DESCRIPTION="Process Explorer for Linux, inspired by a Windows process explorer made by Mark Russinovich" HOMEPAGE="http://sourceforge.net/apps/mediawiki/procexp/index.php?title=Main_Page" SRC_URI="mirror://sourceforge/project/procexp/sources_v1.0/${PN}_${PV}.orig.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" RDEPEND="dev-python/PyQt4 dev-python/configobj dev-python/pyqwt" S="${WORKDIR}/${PN}" # No build system provided by upstream, bug filed: https://sourceforge.net/tracker/?func=detail&aid=3573774&group_id=309156&atid=1301952 pkg_setup() { python_set_active_version 2 python_pkg_setup } src_prepare() { # Adding shebang. sed -e '1i#!/usr/bin/env python2' -i procexp.py || die # Removing unnecessary svn cruft, packaging system and shell script. esvn_clean rm procexp.desktop procexp.sh make_rpm.py process_explorer.spec || die } src_install() { newicon -s 48 icon.png procexp.png rm icon.png || die make_desktop_entry ${PN} "Linux Process Explorer" /usr/share/icons/hicolor/48x48/apps/${PN}.png "System;Utility;" dodir "/usr/$(get_libdir)/${PN}" insinto "/usr/$(get_libdir)/${PN}/" doins -r * dodir /usr/bin dosym "${EROOT}usr/$(get_libdir)/${PN}/procexp.py" /usr/bin/procexp fperms +x "/usr/$(get_libdir)/${PN}/procexp.py" || die } pkg_preinst() { gnome2_icon_savelist } pkg_postinst() { python_need_rebuild python_mod_optimize "${EROOT}usr/$(get_libdir)/${PN}/" gnome2_icon_cache_update elog "Emerge sys-apps/ethtool and run as root to take advantage of network monitoring features (via ethtool)." } pkg_postrm() { python_mod_cleanup "${EROOT}usr/$(get_libdir)/${PN}/" gnome2_icon_cache_update }