comparison 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
comparison
equal deleted inserted replaced
303:e93f329bcdf7 304:fc2276723d9a
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
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 $
4
5 EAPI="4"
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"
12
13 LICENSE="MPL-1.1"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE=""
17
18 RDEPEND="dev-lang/erlang"
19 DEPEND="${RDEPEND}
20 app-text/docbook-xml-dtd:4.5
21 app-text/xmlto
22 dev-libs/libxslt
23 dev-python/simplejson
24 "
25
26 pkg_setup() {
27 enewgroup rabbitmq
28 enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
29 }
30
31 src_compile() {
32 emake all docs_all || die "emake all failed"
33 gunzip docs/*.gz
34 }
35
36 src_install() {
37 # erlang module
38 local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
39
40 einfo "Setting correct RABBITMQ_HOME in scripts"
41 sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
42 -i scripts/rabbitmq-env
43
44 einfo "Installing Erlang modules to ${targetdir}"
45 insinto "${targetdir}"
46 doins -r ebin include
47
48 einfo "Installing server scripts to /usr/sbin"
49 for script in rabbitmq-env rabbitmq-server rabbitmqctl; do
50 exeinto /usr/libexec/rabbitmq
51 doexe scripts/${script}
52 newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
53 done
54
55 # create the directory where our log file will go.
56 diropts -m 0770 -o rabbitmq -g rabbitmq
57 keepdir /var/log/rabbitmq
58
59 # create the mnesia directory
60 diropts -m 0770 -o rabbitmq -g rabbitmq
61 dodir /var/lib/rabbitmq{,/mnesia}
62
63 # install the init script
64 newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
65
66 # install documentation
67 doman docs/*.[15]
68 dodoc README
69 }
70
71 pkg_preinst() {
72 if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
73 elog "IMPORTANT UPGRADE NOTICE:"
74 elog
75 elog "RabbitMQ is now running as an unprivileged user instead of root."
76 elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
77 elog "Please run the following commands as root:"
78 elog
79 elog " usermod -d /var/lib/rabbitmq rabbitmq"
80 elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
81 elog
82 fi
83 }