annotate net-misc/rabbitmq-server/rabbitmq-server-2.8.1.ebuild @ 333:d546b5c5e59e

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