# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=5 inherit eutils DESCRIPTION="A lightweight window manager initially based on aewm++" HOMEPAGE="http://pekwm.org/" SRC_URI="http://pekwm.org/projects/pekwm/files/${P}.tar.bz2 mirror://gentoo/${PN}-themes.tar.bz2" LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86 ~x86-fbsd" IUSE="debug truetype xinerama contrib" RDEPEND="virtual/jpeg media-libs/libpng x11-libs/libXpm x11-libs/libXrandr x11-libs/libXrender truetype? ( x11-libs/libXft ) xinerama? ( x11-libs/libXinerama ) contrib? ( dev-lang/perl gnome-extra/zenity )" DEPEND="${RDEPEND} virtual/pkgconfig" DOCS="README ChangeLog* AUTHORS NEWS" src_configure() { econf \ $(use_enable debug) \ $(use_enable truetype xft) \ $(use_enable xinerama) \ --enable-image-jpeg \ --enable-image-png \ --enable-image-xpm \ --enable-shape \ --enable-xrandr } src_install() { default rm "${WORKDIR}"/themes/Ace/.theme.swp mv "${WORKDIR}"/themes/* "${D}/usr/share/${PN}/themes/" # Insert an Xsession echo -e "#!/bin/sh\n\n/usr/bin/${PN}" > "${T}"/${PN} exeinto /etc/X11/Sessions doexe "${T}"/${PN} # Insert a GDM/KDM xsession file make_session_desktop ${PN} ${PN} # Install contributor scripts into doc folder if use contrib ; then rm contrib/lobo/Makefile* docompress -x /usr/share/doc/${PF}/contrib exeinto /usr/share/doc/${PF}/contrib doexe contrib/lobo/*.pl rm contrib/lobo/*.pl docinto contrib dodoc contrib/lobo/* fi } pkg_postinst() { if use contrib ; then elog " User contributed scripts had been installed into: /usr/share/doc/${PF}/contrib" elog " You may find more info about them and their usage in: /usr/share/doc/${PF}/contrib/README" fi }