# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/x11-wm/ion-devel/ion-devel-20031211.ebuild,v 1.3 2004/01/07 20:21:13 mr_bones_ Exp $ inherit eutils DESCRIPTION="A tiling tabbed window manager designed with keyboard users in mind" HOMEPAGE="http://www.iki.fi/tuomov/ion/" SRC_URI="http://modeemi.fi/~tuomov/dl/${P}.tar.gz" LICENSE="Clarified-Artistic" SLOT="0" KEYWORDS="~alpha ~arm ~hppa ~mips ~ppc ~sparc ~x86 ~amd64" IUSE="xinerama" DEPEND="virtual/x11 app-misc/run-mailcap >=dev-lang/lua-5.0.1_beta20031003" S=${WORKDIR}/${P/_p/-} src_unpack() { unpack ${P}.tar.gz cat >${T}/system.mk.patch <=sys-devel/gcc-3'; then einfo Enabling Lua function call optimizations sed -i system.mk \ -e 's/#\(C99_SOURCE=-std=c99 -DCF_HAS_VA_COPY\)/\1/' eend $? fi } src_compile() { emake || die } src_install() { make PREFIX=${D}/usr ETCDIR=${D}/etc/X11/ion install || die insinto /usr/include/ion doins *.h *.mk mkexports.lua for i in de floatws ioncore ionws luaextl menu query; do insinto /usr/include/ion/${i} doins ${i}/*.h done insinto /usr/include/ion/libtu doins libtu/include/libtu/* echo -e "#!/bin/sh\n/usr/bin/ion" > ${T}/ion echo -e "#!/bin/sh\n/usr/bin/pwm" > ${T}/pwm exeinto /etc/X11/Sessions doexe ${T}/ion ${T}/pwm } pkg_postinst() { einfo "The configuration files have moved and some have been renamed." einfo "To remove stale system-wide files and update user configurations run" einfo " ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" } pkg_config() { einfo "Removing stale system-wide configuration files" rm -Rf ${R}/etc/X11/ion-devel ${R}/etc/X11/Sessions/ion-devel eend 0 einfo "Updating user configurations..." for h in $(cut -d: -f6 ${R}/etc/passwd); do if test -d ${R}${h}/.ion-devel; then test -d ${R}${h}/.ion2 && break einfo ${h} cp -a ${R}${h}/.ion-devel ${R}${h}/.ion2 for i in ${R}${h}/.ion2/ioncore*.lua; do sed -i ${i} -e 's/ioncore/ion/g' mv ${i} ${i/ioncore/ion} done rm -f ${R}${h}/.ion2/ioncore*.lua eend 0 fi done }