summaryrefslogtreecommitdiff
blob: 9aa7684924b8d3545160c59317825267a16a1e65 (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
70
71
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/omniORB/omniORB-4.0.3.ebuild,v 1.9 2005/04/01 16:23:04 agriffis Exp $

DESCRIPTION="A robust, high-performance CORBA 2 ORB"
SRC_URI="mirror://sourceforge/omniorb/${PF}.tar.gz"
HOMEPAGE="http://omniorb.sourceforge.net/"

IUSE="ssl"

LICENSE="LGPL-2 GPL-2"
SLOT="0"
KEYWORDS="x86 alpha ~ia64 ~amd64 ~ppc"

DEPEND="dev-lang/python
	ssl? ( >=dev-libs/openssl-0.9.6b )"

src_compile() {
	cd ${S}

	mkdir ${S}/build
	cd ${S}/build

	MY_CONF="--prefix=/usr --with-omniORB-config=/etc/omniorb/omniORB.cfg --with-omniNames-logdir=/var/log/omniORB"

	use ssl && MY_CONF="${MY_CONF} --with-openssl=/usr"

	MY_PY=/usr/bin/python`python -c "import sys; print sys.version[:3]"`

	PYTHON=${MY_PY} ../configure ${MY_CONF} || die "./configure failed"
	emake
}

src_install () {

	cd ${S}/build
	emake DESTDIR=${D} install

	cd ${S}
	dodoc COPYING* CREDITS README* ReleaseNotes*

	cd ${S}/doc
	docinto print
	dodoc *.ps
	dodoc *.tex
	dodoc *.pdf

	dodoc -r .

	dodir /etc/env.d/
	echo "PATH=/usr/share/omniORB/bin/scripts" > ${D}/etc/env.d/90omniORB
	echo "OMNIORB_CONFIG=/etc/omniorb/omniORB.cfg" >> ${D}/etc/env.d/90omniORB
	exeinto /etc/init.d
	newexe ${FILESDIR}/omniORB-4.0.0 omniORB

	cp ${S}/sample.cfg ${S}/omniORB.cfg
	dodir /etc/omniorb
	insinto /etc/omniorb
	doins ${S}/omniORB.cfg

}

pkg_postinst() {
	echo "Performing post-installation routines for ${P}."

	if [ ! -f "${ROOT}etc/omniorb/omniORB.cfg" ] ; then
		echo "ORBInitialHost `uname -n`" > ${ROOT}etc/omniorb/omniORB.cfg
		echo "ORBInitialPort 2809" >> ${ROOT}etc/omniorb/omniORB.cfg
	fi
	#/usr/bin/python ${ROOT}usr/share/doc/${PF}/mkomnistubs.py
}