# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/dev-util/desktop-file-utils/desktop-file-utils-0.12.ebuild,v 1.10 2007/05/27 01:16:22 kumba Exp $ inherit eutils elisp-common DESCRIPTION="Command line utilities to work with desktop menu entries" HOMEPAGE="http://www.freedesktop.org/software/desktop-file-utils/" SRC_URI="http://www.freedesktop.org/software/desktop-file-utils/releases/${P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="emacs" RDEPEND=">=dev-libs/glib-2.6.0 emacs? ( virtual/emacs )" DEPEND="${RDEPEND} dev-util/pkgconfig" src_unpack() { unpack ${A} cd "${S}" sed -e "s:SUBDIRS = src misc:SUBDIRS = src:" -i Makefile.in # add the man pages, see bug #85354 epatch "${FILESDIR}"/${PN}-0.10-man.patch } src_compile() { econf emake || die "emake failed" if use emacs ; then elisp-compile "${S}/misc/desktop-entry-mode.el" fi } src_install() { emake DESTDIR="${D}" install || die if use emacs; then insinto "${SITELISP}" doins ${S}/misc/desktop-entry-mode.el* elisp-site-file-install "${S}/misc/desktop-entry-mode.el" fi dodoc AUTHORS ChangeLog NEWS README doman man/* } pkg_postinst() { use emacs && elisp-site-regen } pkg_postrm() { # regenerate site-gentoo if we are merged USE=emacs and unmerged # USE=-emacs has_version virtual/emacs && elisp-site-regen }