summaryrefslogtreecommitdiff
blob: 62e3eb1e9c9b5d187d82adc5649a0fe65074da62 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/xpvm/xpvm-1.2.5-r3.ebuild,v 1.4 2004/08/14 13:45:43 swegener Exp $

inherit eutils

DESCRIPTION="XPVM: A graphical console and monitor for PVM"
SRC_URI="http://www.netlib.org/pvm3/xpvm/XPVM.src.1.2.5.tgz"
HOMEPAGE="http://www.csm.ornl.gov/pvm/pvm_home.html"
IUSE=""

DEPEND=">=sys-cluster/pvm-3.4.1-r1
	dev-lang/tcl
	dev-lang/tk"
RDEPEND=""

SLOT="0"
KEYWORDS="~x86"
LICENSE="LGPL-2"

src_unpack() {
	unpack ${A}
	epatch ${FILESDIR}/xpvm-1.2.5-gentoo.diff
}

src_compile() {
	export XPVM_ROOT="${WORKDIR}/xpvm"

	cd ${WORKDIR}/xpvm

	if [ -z "${PVM_ROOT}" ]
	then
		die "PVM_ROOT variable not set. Please run env-update and source /etc/profile."
	elif [ -z "${PVM_ARCH}" ]
	then
		die "PVM_ARCH variable not set. Please run env-update and source /etc/profile."
	fi

	emake xpvm || die
}

src_install() {
	XPVM_ROOT=${PVM_ROOT}/xpvm

	cd ${WORKDIR}/xpvm
	dodir ${PVM_ROOT}/xpvm
	dodir ${PVM_ROOT}/bin/${PVM_ARCH}
	dodir /usr/bin

	#create symlinks to xpvm binary
	dosym ${XPVM_ROOT}/src/${PVM_ARCH}/xpvm ${PVM_ROOT}/bin/${PVM_ARCH}/xpvm
	dosym ${XPVM_ROOT}/src/${PVM_ARCH}/xpvm /usr/bin/xpvm

	#install headers and libs and binary
	cp ${WORKDIR}/xpvm ${D}/${PVM_ROOT} -r

	#environment variables:
	touch ${T}/97xpvm
	echo XPVM_ROOT=/usr/local/pvm3/xpvm/src >> ${T}/97xpvm
	insinto /etc/env.d
	doins ${T}/97xpvm

	dodoc README
}

pkg_postinst() {
	ewarn "Environment Variables have changed. Do not forget to reboot or perform"
	ewarn "source /etc/profile before using xpvm !"
}