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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jun 16 14:52:17 2014 UTC (5 years, 5 months ago) by ultrabug
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
version bump, drop old

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

1 # Copyright 1999-2014 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.2.2.ebuild,v 1.2 2014/01/08 06:34:33 vapier Exp $
4
5 EAPI="5"
6 PYTHON_DEPEND="2"
7
8 PYTHON_COMPAT=( python{2_6,2_7} )
9
10 inherit eutils python-single-r1 systemd user
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 python-single-r1_pkg_setup
35 }
36
37 src_compile() {
38 emake all docs_all
39 gunzip docs/*.gz
40 }
41
42 src_install() {
43 # erlang module
44 local targetdir="/usr/$(get_libdir)/erlang/lib/rabbitmq_server-${PV}"
45
46 einfo "Setting correct RABBITMQ_HOME in scripts"
47 sed -e "s:^RABBITMQ_HOME=.*:RABBITMQ_HOME=\"${targetdir}\":g" \
48 -i scripts/rabbitmq-env
49
50 einfo "Installing Erlang modules to ${targetdir}"
51 insinto "${targetdir}"
52 doins -r ebin include plugins
53
54 einfo "Installing server scripts to /usr/sbin"
55 for script in rabbitmq-env rabbitmq-server rabbitmqctl rabbitmq-defaults rabbitmq-plugins; do
56 exeinto /usr/libexec/rabbitmq
57 doexe scripts/${script}
58 newsbin "${FILESDIR}"/rabbitmq-script-wrapper ${script}
59 done
60
61 # create the directory where our log file will go.
62 diropts -m 0770 -o rabbitmq -g rabbitmq
63 keepdir /var/log/rabbitmq /etc/rabbitmq
64
65 # create the mnesia directory
66 diropts -m 0770 -o rabbitmq -g rabbitmq
67 dodir /var/lib/rabbitmq{,/mnesia}
68
69 # install the init script
70 newinitd "${FILESDIR}"/rabbitmq-server.init-r3 rabbitmq
71 systemd_dounit "${FILESDIR}/rabbitmq.service"
72
73 # install documentation
74 doman docs/*.[15]
75 dodoc README
76 }
77
78 pkg_preinst() {
79 if has_version "<=net-misc/rabbitmq-server-1.8.0"; then
80 elog "IMPORTANT UPGRADE NOTICE:"
81 elog
82 elog "RabbitMQ is now running as an unprivileged user instead of root."
83 elog "Therefore you need to fix the permissions for RabbitMQs Mnesia database."
84 elog "Please run the following commands as root:"
85 elog
86 elog " usermod -d /var/lib/rabbitmq rabbitmq"
87 elog " chown rabbitmq:rabbitmq -R /var/lib/rabbitmq"
88 elog
89 elif has_version "<net-misc/rabbitmq-server-2.1.1"; then
90 elog "IMPORTANT UPGRADE NOTICE:"
91 elog
92 elog "Please read release notes before upgrading:"
93 elog
94 elog "http://www.rabbitmq.com/release-notes/README-3.0.0.txt"
95 fi
96 }

  ViewVC Help
Powered by ViewVC 1.1.20