/[gentoo-x86]/net-misc/rabbitmq-server/rabbitmq-server-2.5.1.ebuild
Gentoo

Contents of /net-misc/rabbitmq-server/rabbitmq-server-2.5.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat May 12 19:46:46 2012 UTC (7 years, 7 months ago) by hollow
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
fix install location wrt #399831; cleanup

(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)

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.5.1.ebuild,v 1.2 2011/09/30 07:45:54 hollow Exp $
4
5 EAPI="2"
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-r2 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 }

  ViewVC Help
Powered by ViewVC 1.1.20