230
|
1 # Copyright 1999-2010 Gentoo Foundation
|
131
|
2 # Distributed under the terms of the GNU General Public License v2
|
230
|
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/rabbitmq-server-1.8.0.ebuild,v 1.1 2010/07/03 08:21:06 hollow Exp $
|
|
4
|
|
5 EAPI="2"
|
131
|
6
|
|
7 inherit eutils
|
|
8
|
|
9 DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang."
|
|
10 HOMEPAGE="http://www.rabbitmq.com/"
|
|
11 SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
|
230
|
12
|
131
|
13 LICENSE="MPL-1.1"
|
|
14 SLOT="0"
|
|
15 KEYWORDS="~amd64 ~x86"
|
|
16 IUSE=""
|
|
17
|
230
|
18 RDEPEND="dev-lang/erlang"
|
|
19 DEPEND="${RDEPEND}
|
|
20 dev-libs/libxslt
|
|
21 dev-python/simplejson
|
|
22 "
|
|
23
|
|
24 pkg_setup() {
|
|
25 enewgroup rabbitmq
|
|
26 enewuser rabbitmq -1 -1 -1 rabbitmq
|
|
27 }
|
131
|
28
|
|
29 src_install() {
|
|
30 # erlang module
|
230
|
31 local targetdir="/usr/$(get_libdir)/erlang/lib/${P}"
|
131
|
32
|
230
|
33 einfo "Setting correct RABBITMQ_HOME in scripts"
|
|
34 sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
|
|
35 -i scripts/rabbitmq_env
|
131
|
36
|
|
37 einfo "Installing Erlang module to ${targetdir}"
|
230
|
38 insinto "${targetdir}"
|
|
39 doins -r ebin include
|
131
|
40
|
|
41 einfo "Installing server scripts to /usr/sbin"
|
230
|
42 dosbin scripts/rabbitmq-multi scripts/rabbitmq-server scripts/rabbitmq-env \
|
|
43 scripts/rabbitmq-activate-plugins scripts/rabbitmq-deactivate-plugins \
|
|
44 scripts/rabbitmqctl
|
131
|
45
|
|
46 # create the directory where our log file will go.
|
|
47 diropts -m 0770 -o rabbitmq -g rabbitmq
|
|
48 keepdir /var/log/rabbitmq
|
|
49
|
|
50 # create the mnesia directory
|
|
51 diropts -m 0770 -o rabbitmq -g rabbitmq
|
|
52 dodir /var/lib/rabbitmq/mnesia
|
|
53
|
|
54 # Install the init script
|
|
55 newinitd "${FILESDIR}"/rabbitmq-server.init rabbitmq
|
230
|
56
|
|
57 dodoc README
|
131
|
58 }
|