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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Wed May 22 15:14:54 2013 UTC (6 years, 6 months ago) by ultrabug
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
fix #470944 thx to Heather for reporting

(Portage version: 2.1.12.1/cvs/Linux x86_64, signed Manifest commit with key B658FA13)

1 # Copyright 1999-2013 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-3.1.0.ebuild,v 1.1 2013/05/21 07:31:10 ultrabug Exp $
4
5 EAPI="5"
6 PYTHON_DEPEND="2"
7
8 PYTHON_COMPAT=( python{2_5,2_6,2_7} )
9
10 inherit eutils python-r1 systemd
11
12 DESCRIPTION="RabbitMQ is a high-performance AMQP-compliant message broker written in Erlang."
13 HOMEPAGE="http://www.rabbitmq.com/"
14 SRC_URI="http://www.rabbitmq.com/releases/rabbitmq-server/v${PV}/rabbitmq-server-${PV}.tar.gz"
15
16 LICENSE="GPL-2 MPL-1.1"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE=""
20
21 RDEPEND="dev-lang/erlang"
22 DEPEND="${RDEPEND}
23 app-arch/zip
24 app-arch/unzip
25 app-text/docbook-xml-dtd:4.5
26 app-text/xmlto
27 dev-libs/libxslt
28 dev-python/simplejson
29 "
30
31 pkg_setup() {
32 enewgroup rabbitmq
33 enewuser rabbitmq -1 -1 /var/lib/rabbitmq rabbitmq
34 }
35
36 src_compile() {
37 emake all docs_all
38 gunzip docs/*.gz
39 }
40
41 src_install() {
42 # erlang module
43 local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
44
45 einfo "Setting correct RABBITMQ_HOME in scripts"
46 sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
47 -i scripts/rabbitmq-env
48
49 einfo "Installing Erlang modules to ${targetdir}"
50 insinto "${targetdir}"
51 doins -r ebin include plugins
52
53 einfo "Installing server scripts to /usr/sbin"
54 for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-defaults rabbitmq-plugins; do
55 exeinto /usr/libexec/rabbitmq
56 doexe scripts/${script}
57 newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
58 done
59
60 # create the directory where our log file will go.
61 diropts -m 0770 -o rabbitmq -g rabbitmq
62 keepdir /var/log/rabbitmq /etc/rabbitmq
63
64 # create the mnesia directory
65 diropts -m 0770 -o rabbitmq -g rabbitmq
66 dodir /var/lib/rabbitmq{,/mnesia}
67
68 # install the init script
69 newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
70 systemd_dounit "${FILESDIR}/rabbitmq.service"
71
72 # install documentation
73 doman docs/*.[15]
74 dodoc README
75 }
76
77 pkg_preinst() {
78 if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
79 elog "IMPORTANT UPGRADE NOTICE:"
80 elog
81 elog "RabbitMQ is now running as an unprivileged user instead of root."
82 elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
83 elog "Please run the following commands as root:"
84 elog
85 elog " usermod -d /var/lib/rabbitmq rabbitmq"
86 elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
87 elog
88 elif has_version "<net-misc/rabbitmq-server-2.1.1"; then
89 elog "IMPORTANT UPGRADE NOTICE:"
90 elog
91 elog "Please read release notes before upgrading:"
92 elog
93 elog "http://www.rabbitmq.com/release-notes/README-3.0.0.txt"
94 fi
95 }

  ViewVC Help
Powered by ViewVC 1.1.20