annotate net-misc/rabbitmq-server/rabbitmq-server-2.7.0.ebuild @ 304:fc2276723d9a

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