|
Hubert Plociniczak |
cc9fdf |
%define debug_package %{nil}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
Name: rabbitmq-server
|
|
Hubert Plociniczak |
69d917 |
Version: 1.6.0
|
|
Hubert Plociniczak |
69d917 |
Release: 1%{?dist}
|
|
Hubert Plociniczak |
cc9fdf |
License: MPLv1.1
|
|
Hubert Plociniczak |
cc9fdf |
Group: Development/Libraries
|
|
Hubert Plociniczak |
cc9fdf |
Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz
|
|
Hubert Plociniczak |
cc9fdf |
Source1: rabbitmq-server.init
|
|
Hubert Plociniczak |
cc9fdf |
Source2: rabbitmq-script-wrapper
|
|
Hubert Plociniczak |
cc9fdf |
Source3: rabbitmq-server.logrotate
|
|
Hubert Plociniczak |
cc9fdf |
URL: http://www.rabbitmq.com/
|
|
Hubert Plociniczak |
cc9fdf |
BuildRequires: erlang, python-simplejson
|
|
Hubert Plociniczak |
cc9fdf |
Requires: erlang, logrotate
|
|
Hubert Plociniczak |
cc9fdf |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_arch}-root
|
|
Hubert Plociniczak |
cc9fdf |
Summary: The RabbitMQ server
|
|
Hubert Plociniczak |
cc9fdf |
Requires(post): chkconfig initscripts
|
|
Hubert Plociniczak |
cc9fdf |
Requires(pre): chkconfig initscripts
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%description
|
|
Hubert Plociniczak |
cc9fdf |
RabbitMQ is an implementation of AMQP, the emerging standard for high
|
|
Hubert Plociniczak |
cc9fdf |
performance enterprise messaging. The RabbitMQ server is a robust and
|
|
Hubert Plociniczak |
cc9fdf |
scalable implementation of an AMQP broker.
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%define _rabbit_erllibdir %{_libdir}/erlang/lib/rabbitmq_server-%{version}
|
|
Hubert Plociniczak |
cc9fdf |
%define _rabbit_libdir %{_libdir}/rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
%define _rabbit_wrapper %{_builddir}/`basename %{S:2}`
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%define _maindir %{buildroot}%{_rabbit_erllibdir}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%prep
|
|
Hubert Plociniczak |
cc9fdf |
%setup -q
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%build
|
|
Hubert Plociniczak |
cc9fdf |
cp %{S:2} %{_rabbit_wrapper}
|
|
Hubert Plociniczak |
cc9fdf |
sed -i 's|/usr/lib/|%{_libdir}/|' %{_rabbit_wrapper}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
# The rabbitmq build needs escript, which is missing from /usr/bin in
|
|
Hubert Plociniczak |
cc9fdf |
# some versions of the erlang RPM. See
|
|
Hubert Plociniczak |
cc9fdf |
# <https://bugzilla.redhat.com/show_bug.cgi?id=481302>
|
|
Hubert Plociniczak |
cc9fdf |
PATH=%{_libdir}/erlang/bin:$PATH make %{?_smp_mflags}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%install
|
|
Hubert Plociniczak |
cc9fdf |
rm -rf %{buildroot}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
make install TARGET_DIR=%{_maindir} \
|
|
Hubert Plociniczak |
cc9fdf |
SBIN_DIR=%{buildroot}%{_rabbit_libdir}/bin \
|
|
Hubert Plociniczak |
cc9fdf |
MAN_DIR=%{buildroot}%{_mandir}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia
|
|
Hubert Plociniczak |
cc9fdf |
mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
#Copy all necessary lib files etc.
|
|
Hubert Plociniczak |
cc9fdf |
install -p -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmqctl
|
|
Hubert Plociniczak |
cc9fdf |
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
install -p -D -m 0755 %{_rabbit_wrapper} %{buildroot}%{_sbindir}/rabbitmq-multi
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
rm %{_maindir}/LICENSE %{_maindir}/LICENSE-MPL-RabbitMQ %{_maindir}/INSTALL
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
#Build the list of files
|
|
Hubert Plociniczak |
cc9fdf |
rm -f %{_builddir}/filelist.%{name}.rpm
|
|
Hubert Plociniczak |
cc9fdf |
echo '%defattr(-,root,root, -)' >> %{_builddir}/filelist.%{name}.rpm
|
|
Hubert Plociniczak |
cc9fdf |
(cd %{buildroot}; \
|
|
Hubert Plociniczak |
cc9fdf |
find . -type f ! -regex '\.%{_sysconfdir}.*' \
|
|
Hubert Plociniczak |
cc9fdf |
! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \
|
|
Hubert Plociniczak |
cc9fdf |
| sed -e 's/^\.//' >> %{_builddir}/filelist.%{name}.rpm)
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%pre
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
if [ $1 -gt 1 ]; then
|
|
Hubert Plociniczak |
cc9fdf |
#Upgrade - stop and remove previous instance of rabbitmq-server init.d script
|
|
Hubert Plociniczak |
cc9fdf |
/sbin/service rabbitmq-server stop
|
|
Hubert Plociniczak |
cc9fdf |
/sbin/chkconfig --del rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
fi
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
# create rabbitmq group
|
|
Hubert Plociniczak |
cc9fdf |
if ! getent group rabbitmq >/dev/null; then
|
|
Hubert Plociniczak |
cc9fdf |
groupadd -r rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
fi
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
# create rabbitmq user
|
|
Hubert Plociniczak |
cc9fdf |
if ! getent passwd rabbitmq >/dev/null; then
|
|
Hubert Plociniczak |
cc9fdf |
useradd -r -g rabbitmq -d %{_localstatedir}/lib/rabbitmq rabbitmq \
|
|
Hubert Plociniczak |
cc9fdf |
-c "RabbitMQ messaging server"
|
|
Hubert Plociniczak |
cc9fdf |
fi
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%post
|
|
Hubert Plociniczak |
cc9fdf |
/sbin/chkconfig --add %{name}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%preun
|
|
Hubert Plociniczak |
cc9fdf |
if [ $1 = 0 ]; then
|
|
Hubert Plociniczak |
cc9fdf |
#Complete uninstall
|
|
Hubert Plociniczak |
cc9fdf |
/sbin/service rabbitmq-server stop
|
|
Hubert Plociniczak |
cc9fdf |
/sbin/chkconfig --del rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
# We do not remove /var/log and /var/lib directories
|
|
Hubert Plociniczak |
cc9fdf |
# Leave rabbitmq user and group
|
|
Hubert Plociniczak |
cc9fdf |
fi
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%files -f ../filelist.%{name}.rpm
|
|
Hubert Plociniczak |
cc9fdf |
%defattr(-,root,root,-)
|
|
Hubert Plociniczak |
cc9fdf |
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
%dir %{_sysconfdir}/rabbitmq
|
|
Hubert Plociniczak |
cc9fdf |
%{_rabbit_erllibdir}
|
|
Hubert Plociniczak |
cc9fdf |
%{_rabbit_libdir}
|
|
Hubert Plociniczak |
cc9fdf |
%{_initrddir}/rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
%config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server
|
|
Hubert Plociniczak |
cc9fdf |
%doc LICENSE LICENSE-MPL-RabbitMQ
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%clean
|
|
Hubert Plociniczak |
cc9fdf |
rm -rf %{buildroot}
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
%changelog
|
|
Hubert Plociniczak |
69d917 |
* Wed Jun 17 2009 Matthias Radestock <matthias@lshift.net> 1.6.0-1
|
|
Hubert Plociniczak |
69d917 |
- New upstream release
|
|
Hubert Plociniczak |
69d917 |
|
|
Hubert Plociniczak |
735745 |
* Tue May 26 2009 Hubert Plociniczak <hubert@lshift.net> 1.5.5-2
|
|
Hubert Plociniczak |
735745 |
- Include dist macro in the release number
|
|
Hubert Plociniczak |
735745 |
|
|
Hubert Plociniczak |
cc9fdf |
* Tue May 19 2009 Matthias Radestock <matthias@lshift.net> 1.5.5-1
|
|
Hubert Plociniczak |
cc9fdf |
- Maintenance release for the 1.5.x series
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Mon Apr 6 2009 Matthias Radestock <matthias@lshift.net> 1.5.4-1
|
|
Hubert Plociniczak |
cc9fdf |
- Maintenance release for the 1.5.x series
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Tue Feb 24 2009 Tony Garnock-Jones <tonyg@lshift.net> 1.5.3-1
|
|
Hubert Plociniczak |
cc9fdf |
- Maintenance release for the 1.5.x series
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Mon Feb 23 2009 Tony Garnock-Jones <tonyg@lshift.net> 1.5.2-1
|
|
Hubert Plociniczak |
cc9fdf |
- Maintenance release for the 1.5.x series
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Mon Jan 19 2009 Ben Hood <0x6e6562@gmail.com> 1.5.1-1
|
|
Hubert Plociniczak |
cc9fdf |
- Maintenance release for the 1.5.x series
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Wed Dec 17 2008 Matthias Radestock <matthias@lshift.net> 1.5.0-1
|
|
Hubert Plociniczak |
cc9fdf |
- New upstream release
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Thu Jul 24 2008 Tony Garnock-Jones <tonyg@lshift.net> 1.4.0-1
|
|
Hubert Plociniczak |
cc9fdf |
- New upstream release
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Mon Mar 3 2008 Adrien Pierard <adrian@lshift.net> 1.3.0-1
|
|
Hubert Plociniczak |
cc9fdf |
- New upstream release
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Wed Sep 26 2007 Simon MacMullen <simon@lshift.net> 1.2.0-1
|
|
Hubert Plociniczak |
cc9fdf |
- New upstream release
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Wed Aug 29 2007 Simon MacMullen <simon@lshift.net> 1.1.1-1
|
|
Hubert Plociniczak |
cc9fdf |
- New upstream release
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Mon Jul 30 2007 Simon MacMullen <simon@lshift.net> 1.1.0-1.alpha
|
|
Hubert Plociniczak |
cc9fdf |
- New upstream release
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Tue Jun 12 2007 Hubert Plociniczak <hubert@lshift.net> 1.0.0-1.20070607
|
|
Hubert Plociniczak |
cc9fdf |
- Building from source tarball, added starting script, stopping
|
|
Hubert Plociniczak |
cc9fdf |
|
|
Hubert Plociniczak |
cc9fdf |
* Mon May 21 2007 Hubert Plociniczak <hubert@lshift.net> 1.0.0-1.alpha
|
|
Hubert Plociniczak |
cc9fdf |
- Initial build of server library of RabbitMQ package
|