summaryrefslogtreecommitdiff
blob: b9b7c7de0d394b9e37eef02ca7facf237c82b761 (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
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/openmosix-user/openmosix-user-0.1.3.ebuild,v 1.3 2002/04/27 23:34:20 bangert Exp $

S=${WORKDIR}/openMosixUserland-${PV}
DESCRIPTION="User-land utilities for openMosix process migration (clustering) software"
SRC_URI="http://prdownloads.sourceforge.net/openmosix/openMosixUserland-${PV}.tgz"
HOMEPAGE="http://www.openmosix.com"
RDEPEND="virtual/glibc >=sys-libs/ncurses-5.2"
DEPEND="$RDEPEND ~sys-kernel/openmosix-sources-2.4.17_pre3 sys-apps/findutils sys-devel/perl"

src_unpack() {
	unpack ${A}
	cd ${S}
	cat > configuration << EOF
OPENMOSIX=/usr/src/linux
PROCDIR=/proc/hpc
MONNAME=mmon
CC=gcc
INSTALLDIR=/usr
CFLAGS=-I/m/include -I./ -I/usr/include -I\$(OPENMOSIX)/include ${CFLAGS}
INSTALL=/usr/bin/install
EOF
	#use perl, find and xargs to convert /usr/man references to /usr/share/man (FHS)
	find . -iname Makefile | xargs perl -pi.orig -e "s:INSTALLDIR\)/man:INSTALLDIR)/share/man:g"
}

src_compile() {
	cd ${S}
	make clean build man 
}

src_install () {
	make INSTALLDIR=${D}/usr install
	dodoc COPYING README
	exeinto /etc/init.d
	newexe ${FILESDIR}/openmosix.init openmosix
	insinto /etc
	#stub mosix.map file
	doins ${FILESDIR}/mosix.map
}

pkg_postinst() {
	echo
	echo " To complete openMosix installation, edit /etc/mosix.map and then type:
	echo "# rc-update add openmosix default
	echo " ...to add openMosix to the default runlevel.  This particular version of"
	echo " openmosix-user has been designed to work with the 2.4.17-pre3-openmosix"
	echo " kernel (sys-kernel/openmosix-sources-2.4.17_pre3.)"
	echo
}