packages: rabbitmq-server/rabbitmq-server.init (NEW), rabbitmq-server/rabbi...
emes
emes at pld-linux.org
Mon Oct 25 23:34:29 CEST 2010
Author: emes Date: Mon Oct 25 21:34:29 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- initial release, 2.1.1
---- Files affected:
packages/rabbitmq-server:
rabbitmq-server.init (NONE -> 1.1) (NEW), rabbitmq-server.spec (NONE -> 1.1) (NEW), rabbitmq.conf (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/rabbitmq-server/rabbitmq-server.init
diff -u /dev/null packages/rabbitmq-server/rabbitmq-server.init:1.1
--- /dev/null Mon Oct 25 23:34:29 2010
+++ packages/rabbitmq-server/rabbitmq-server.init Mon Oct 25 23:34:23 2010
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# rabbitmq-server Starts the rabbitmq-server daemon
+#
+# chkconfig: 345 60 40
+# description: Supervise rabbitmq-server
+# processname: rabbitmq-server
+#
+# pidfile: /var/run/rabbitmq-server.pid
+#
+# processname: rabbitmq-server
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+DAEMON=/usr/sbin/rabbitmq-multi
+USER=rabbitmq
+NODE_COUNT=1
+
+DEFAULTS_FILE=/etc/sysconfig/rabbitmq-server
+
+if [ -f "$DEFAULTS_FILE" ]; then
+ . $DEFAULTS_FILE
+fi
+
+start() {
+ msg_starting "rabbitmq-server daemon"
+ daemon --user $USER $DAEMON start_all $NODE_COUNT
+}
+
+stop() {
+ msg_stopping "rabbitmq-server daemon"
+ daemon --user $USER $DAEMON stop_all
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ status)
+ status rabbitmq-server
+ ;;
+ *)
+ msg_usage "$0 {start|stop|status}"
+ exit 3
+esac
+
+exit $RETVAL
================================================================
Index: packages/rabbitmq-server/rabbitmq-server.spec
diff -u /dev/null packages/rabbitmq-server/rabbitmq-server.spec:1.1
--- /dev/null Mon Oct 25 23:34:29 2010
+++ packages/rabbitmq-server/rabbitmq-server.spec Mon Oct 25 23:34:23 2010
@@ -0,0 +1,84 @@
+# $Revision$, $Date$
+%define uid 257
+%define gid 257
+Summary: Implementation of an AMQP broker
+Name: rabbitmq-server
+Version: 2.1.1
+Release: 0.10
+License: MPL v1.1
+Group: Applications/Communications
+Source0: http://www.rabbitmq.com/releases/%{name}/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 2359d4b90431925e971726a6e0274bf8
+Source1: rabbitmq.conf
+Source2: %{name}.init
+URL: http://www.rabbitmq.com
+BuildRequires: xmlto
+BuildRequires: docbook-dtd45-xml
+Requires: erlang
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+RabbitMQ provides robust messaging for applications. It is easy to
+use, fit for purpose at cloud scale and supported on all major
+operating systems and developer platforms.
+
+%prep
+%setup -q
+
+%build
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+ TARGET_DIR=$RPM_BUILD_ROOT/%{_datadir}/%{name} \
+ SBIN_DIR=$RPM_BUILD_ROOT/%{_sbindir} \
+ MAN_DIR=$RPM_BUILD_ROOT/%{_mandir} \
+
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/rabbitmq/
+install -d $RPM_BUILD_ROOT/var/lib/rabbitmq
+install -d $RPM_BUILD_ROOT/var/log/rabbitmq
+install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rabbitmq/rabbitmq.conf
+install -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%pre
+%groupadd -r -g %{gid} rabbitmq
+%useradd -r -u %{uid} -s /bin/sh -d /var/lib/rabbitmq -g rabbitmq -c "RabbitMQ Server" rabbitmq
+
+%post
+/sbin/chkconfig --add rabbitmq-server
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE README LICENSE-MPL-RabbitMQ
+%config(noreplace) %verify(not md5 mtime size) /etc/rabbitmq/rabbitmq.conf
+%attr(755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
+%attr(755,root,root) %{_sbindir}/*
+%dir %{_datadir}/%{name}
+%dir %{_datadir}/%{name}/ebin
+%dir %{_datadir}/%{name}/include
+%dir %{_datadir}/%{name}/plugins
+%dir %{_datadir}/%{name}/sbin
+%{_datadir}/%{name}/ebin/*
+%{_datadir}/%{name}/include/*
+%{_datadir}/%{name}/plugins/*
+%attr(755,root,root) %{_datadir}/%{name}/sbin/*
+%{_mandir}/man1/*
+%{_mandir}/man5/*
+%attr(755,rabbitmq,rabbitmq) /var/lib/rabbitmq
+%attr(755,rabbitmq,rabbitmq) /var/log/rabbitmq
+
+%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1 2010/10/25 21:34:23 emes
+- initial release, 2.1.1
+
================================================================
Index: packages/rabbitmq-server/rabbitmq.conf
diff -u /dev/null packages/rabbitmq-server/rabbitmq.conf:1.1
--- /dev/null Mon Oct 25 23:34:29 2010
+++ packages/rabbitmq-server/rabbitmq.conf Mon Oct 25 23:34:23 2010
@@ -0,0 +1,14 @@
+# Customized settings for RabbitMQ server
+
+# Node name
+NODENAME=rabbit
+
+# IPv4 settings (defaults)
+# RABBITMQ_NODE_IP_ADDRESS=0.0.0.0
+# RABBITMQ_NODE_PORT=5672
+
+# Home dir
+HOME=/var/lib/rabbitmq
+
+# Logs
+RABBITMQ_LOGBASE=/var/log/rabbitmq
================================================================
More information about the pld-cvs-commit
mailing list