# Copyright 1999-2014 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="contrib debug truetype xinerama" DEPEND="virtual/jpeg media-libs/libpng x11-libs/libXpm x11-libs/libXrandr x11-libs/libXrender truetype? ( x11-libs/libXft ) xinerama? ( x11-libs/libXinerama )" RDEPEND="${DEPEND} contrib? ( dev-lang/perl gnome-extra/zenity )" DEPEND="${DEPEND} virtual/pkgconfig" 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 || ewarn "Couldn't remove .theme.swp tile!" mv "${WORKDIR}"/themes/* "${D}/usr/share/${PN}/themes/" || die "Couldn't move themes!" # Insert an Xsession echo -e "#!/bin/sh\n\n/usr/bin/${PN}" > "${T}"/${PN} || die "Couldn't create xsession file!" 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* || die "Couldn't remove Makefiles from contrib/lobo directory!" docompress -x /usr/share/doc/${PF}/contrib exeinto /usr/share/doc/${PF}/contrib doexe contrib/lobo/*.pl rm contrib/lobo/*.pl || die "Couldn't remove perl scripts from contrib/lobo directory!" 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 }