annotate net-misc/rabbitmq-server/rabbitmq-server-2.4.0.ebuild @ 283:18e9c4ed5f1f

get rid of the 1.4 java ebuild, it is in the java overlay
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 23 Jun 2011 12:01:37 +0200
parents a5d43ca434f7
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
270
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
1 # Copyright 1999-2010 Gentoo Foundation
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/rabbitmq-server/rabbitmq-server-2.1.0.ebuild,v 1.1 2010/09/19 08:35:51 hollow Exp $
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
4
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
5 EAPI="2"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
6
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
7 inherit eutils
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
8
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
9 DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang."
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
10 HOMEPAGE="http://www.rabbitmq.com/"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
11 SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
12
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
13 LICENSE="MPL-1.1"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
14 SLOT="0"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
15 KEYWORDS="~amd64 ~x86"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
16 IUSE=""
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
17
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
18 RDEPEND="dev-lang/erlang"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
19 DEPEND="${RDEPEND}
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
20 app-text/docbook-xml-dtd:4.5
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
21 app-text/xmlto
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
22 dev-libs/libxslt
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
23 dev-python/simplejson
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
24 "
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
25
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
26 pkg_setup() {
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
27 enewgroup rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
28 enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
29 }
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
30
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
31 src_compile() {
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
32 emake all docs_all || die "emake all failed"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
33 gunzip docs/*.gz
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
34 }
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
35
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
36 src_install() {
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
37 # erlang module
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
38 local targetdir="/usr/$(get_libdir)/erlang/lib/${P}"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
39
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
40 einfo "Setting correct RABBITMQ_HOME in scripts"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
41 sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
42 -i scripts/rabbitmq-env
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
43
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
44 einfo "Installing Erlang modules to ${targetdir}"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
45 insinto "${targetdir}"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
46 doins -r ebin include
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
47
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
48 einfo "Installing server scripts to /usr/sbin"
279
a5d43ca434f7 update to rabbitmq 2.4.0, fix init script :/
holger
parents: 277
diff changeset
49 for script in rabbitmq-env rabbitmq-server rabbitmqctl; do
270
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
50 exeinto /usr/libexec/rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
51 doexe scripts/${script}
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
52 newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
53 done
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
54
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
55 # create the directory where our log file will go.
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
56 diropts -m 0770 -o rabbitmq -g rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
57 keepdir /var/log/rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
58
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
59 # create the mnesia directory
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
60 diropts -m 0770 -o rabbitmq -g rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
61 dodir /var/lib/rabbitmq{,/mnesia}
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
62
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
63 # install the init script
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
64 newinitd "${FILESDIR}"/rabbitmq-server.init-r1 rabbitmq
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
65
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
66 # install documentation
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
67 doman docs/*.[15]
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
68 dodoc README
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
69 }
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
70
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
71 pkg_preinst() {
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
72 if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
73 elog "IMPORTANT UPGRADE NOTICE:"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
74 elog
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
75 elog "RabbitMQ is now running as an unprivileged user instead of root."
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
76 elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
77 elog "Please run the following commands as root:"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
78 elog
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
79 elog " usermod -d /var/lib/rabbitmq rabbitmq"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
80 elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
81 elog
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
82 fi
32de8e2c4a2c update rabbitmq to 2.2.0, cleanups
holger
parents:
diff changeset
83 }