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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jul 23 10:13:38 2012 UTC (2 years, 9 months ago) by ultrabug
Branch: MAIN
Version bump.

(Portage version: 2.1.11.8/cvs/Linux x86_64)

1 ultrabug 1.1 # Copyright 1999-2012 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.8.1-r1.ebuild,v 1.1 2012/05/18 15:00:03 trapni Exp $
4    
5     EAPI="4"
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="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     python_pkg_setup
34     }
35    
36     src_compile() {
37     emake all docs_all || die "emake all failed"
38     gunzip docs/*.gz
39     }
40    
41     src_install() {
42     # erlang module
43     local targetdir="/usr/$(get_libdir)/rabbitmq"
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     fi
89     }

  ViewVC Help
Powered by ViewVC 1.1.20