summaryrefslogtreecommitdiff
blob: ca510d6732eb8ccee2d9b76d90995bd6ddcd78e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-wm/pwm/pwm-1.0.20010309.ebuild,v 1.15 2004/06/28 02:54:34 agriffis Exp $

NPV=20010309
S=${WORKDIR}/pwm-${NPV}
DESCRIPTION="A lightweight window manager"
SRC_URI="http://modeemi.cs.tut.fi/~tuomov/dl/pwm-${NPV}.tar.gz"
HOMEPAGE="http://www.students.tut.fi/~tuomov/pwm"
LICENSE="Artistic"
SLOT="0"
KEYWORDS="x86 sparc ppc"
IUSE="gnome"

DEPEND="virtual/x11"

src_unpack() {
	unpack ${A}
	cd ${S}
	cp Makefile Makefile.orig
	sed -e "s:\$(DOCDIR)/pwm:\$(DOCDIR)/${PF}:g" \
	    -e "s:^MANDIR=.*$::" \
	    -e "s:^DOCDIR=.*$::" \
	    -e "s:^ETCDIR=.*$::" \
	    Makefile.orig >Makefile
	cp system.mk system.orig
	sed -e "s:-g -O2:${CFLAGS}:" \
	    -e 's:\$(WARN)::' \
	    system.orig >system.mk
	cp config.h config.orig
	sed -e "s:^#define CF_SYS_CONFIG_LOCATION.*$:#define CF_SYS_CONFIG_LOCATION \"/etc/X11/pwm/\":" \
	    config.orig >config.h
}

src_compile() {
	emake PREFIX=/usr \
	     MANDIR=/usr/share/man \
	     DOCDIR=/usr/share/doc \
	     ETCDIR=/etc/X11 \
	     || die
}

src_install() {
	make PREFIX=${D}/usr \
	     MANDIR=${D}/usr/share/man \
	     DOCDIR=${D}/usr/share/doc \
	     ETCDIR=${D}/etc/X11 \
	     install || die

	if use gnome
	then
		insinto /usr/share/gnome/wm-properties
		doins support/PWM.desktop
	fi
	dodoc ChangeLog README
}