131
|
1 # Copyright 1999-2009 Gentoo Foundation
|
|
2 # Distributed under the terms of the GNU General Public License v2
|
172
|
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/rabbitmq-server-1.5.4-r2.ebuild,v 1.1 2009/06/21 15:45:19 caleb Exp $
|
131
|
4
|
|
5 inherit eutils
|
|
6
|
|
7 DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang."
|
|
8 HOMEPAGE="http://www.rabbitmq.com/"
|
|
9 SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
|
|
10 LICENSE="MPL-1.1"
|
|
11 SLOT="0"
|
|
12 KEYWORDS="~amd64 ~x86"
|
|
13 IUSE=""
|
|
14
|
|
15 # Q: is RDEPEND-only sufficient for a binary package, since we don't compile?
|
168
|
16 DEPEND="dev-lang/erlang
|
|
17 dev-python/simplejson"
|
131
|
18 RDEPEND="${DEPEND}"
|
|
19
|
|
20 src_install() {
|
|
21 # erlang module
|
172
|
22 local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
|
131
|
23
|
|
24 einfo "Correcting additional Erlang code path in scripts"
|
172
|
25 sed -i -e "s:\`dirname \$0\`/rabbitmq-env:/usr/sbin/rabbitmq-env:g" scripts/* || die "sed failed"
|
131
|
26
|
|
27 einfo "Installing Erlang module to ${targetdir}"
|
|
28 dodir "${targetdir}"
|
|
29 cp -dpR ebin include "${D}/${targetdir}"
|
|
30
|
|
31 einfo "Installing server scripts to /usr/sbin"
|
|
32 # Install server scripts to sbin
|
172
|
33 dosbin scripts/rabbitmq-env scripts/rabbitmq-multi scripts/rabbitmq-server \
|
|
34 scripts/rabbitmq-server scripts/rabbitmq-activate-plugins scripts/rabbitmq-deactivate-plugins
|
131
|
35
|
|
36 einfo "Installing rabbitmqctl to /usr/bin"
|
|
37 # Install control script to bin
|
172
|
38 dobin scripts/rabbitmqctl
|
131
|
39
|
|
40 # Docs
|
|
41 dodoc README
|
|
42
|
|
43 # create the directory where our log file will go.
|
|
44 diropts -m 0770 -o rabbitmq -g rabbitmq
|
|
45 keepdir /var/log/rabbitmq
|
|
46
|
|
47 # create the mnesia directory
|
|
48 diropts -m 0770 -o rabbitmq -g rabbitmq
|
|
49 dodir /var/lib/rabbitmq/mnesia
|
|
50
|
|
51 # Install the init script
|
|
52 newinitd "${FILESDIR}"/rabbitmq-server.init rabbitmq
|
|
53 }
|
|
54
|
|
55 pkg_setup() {
|
|
56 enewgroup rabbitmq
|
|
57 enewuser rabbitmq -1 -1 -1 rabbitmq
|
|
58 }
|