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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jul 4 17:01:55 2013 UTC (6 years, 5 months ago) by ultrabug
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
version bump, drop old

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

  ViewVC Help
Powered by ViewVC 1.1.20