diff options
author | Hubert Plociniczak <hubert@lshift.net> | 2009-02-20 15:13:20 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert@lshift.net> | 2009-02-20 15:13:20 +0000 |
commit | 0a32cc48e52e7bcb0a9c21e695b19aa164d39bec (patch) | |
tree | e2fb03b3933b107b8b17b302d568994208c8f1e9 /packaging/RPMS | |
parent | 13344e17280377bb45350b8beadba41f7361a2d1 (diff) | |
parent | 0246da1090a4457395aa1f448680197ed4465bef (diff) | |
download | rabbitmq-server-0a32cc48e52e7bcb0a9c21e695b19aa164d39bec.tar.gz |
Merge v1_5 into bug20329
Diffstat (limited to 'packaging/RPMS')
-rw-r--r-- | packaging/RPMS/Fedora/Makefile | 6 | ||||
-rw-r--r-- | packaging/RPMS/Fedora/init.d | 6 | ||||
-rw-r--r-- | packaging/RPMS/Fedora/rabbitmq-server.spec | 41 |
3 files changed, 22 insertions, 31 deletions
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile index 973608cc..af73cc49 100644 --- a/packaging/RPMS/Fedora/Makefile +++ b/packaging/RPMS/Fedora/Makefile @@ -5,7 +5,7 @@ TARBALL=$(SOURCE_TARBALL_DIR)/rabbitmq-server-$(VERSION).tar.gz TOP_DIR=$(shell pwd) #Under debian we do not want to check build dependencies, since that #only checks build-dependencies using rpms, not debs -DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define 'debian 1' +DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define '_sysconfdir /etc' ifndef RPM_OS RPM_OS=fedora @@ -35,9 +35,9 @@ prepare: cp rabbitmq-server.logrotate SOURCES/rabbitmq-server.logrotate server: prepare - rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) \ + rpmbuild -ba --nodeps SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) \ --target i386 - rpmbuild -ba SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) \ + rpmbuild -ba --nodeps SPECS/rabbitmq-server.spec $(DEFINES) $(OS_DEFINES) \ --define '_libdir /usr/lib64' --define '_arch x86_64' \ --define '_defaultdocdir /usr/share/doc' --target x86_64 diff --git a/packaging/RPMS/Fedora/init.d b/packaging/RPMS/Fedora/init.d index 9223ae1a..fef5fe3d 100644 --- a/packaging/RPMS/Fedora/init.d +++ b/packaging/RPMS/Fedora/init.d @@ -29,8 +29,8 @@ LOCK_FILE=/var/lock/subsys/$NAME test -x $DAEMON || exit 0 # Include rabbitmq defaults if available -if [ -f /etc/default/rabbitmq ] ; then - . /etc/default/rabbitmq +if [ -f /etc/sysconfig/rabbitmq ] ; then + . /etc/sysconfig/rabbitmq fi RETVAL=0 @@ -132,7 +132,7 @@ case "$1" in ;; *) echo "Usage: $0 {start|stop|status|rotate-logs|restart|condrestart|try-restart|reload|force-reload}" >&2 - RETVAL=1 + RETVAL=2 ;; esac diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec index 17daeada..b9693092 100644 --- a/packaging/RPMS/Fedora/rabbitmq-server.spec +++ b/packaging/RPMS/Fedora/rabbitmq-server.spec @@ -1,3 +1,5 @@ +%define debug_package %{nil} + Name: rabbitmq-server Version: %%VERSION%% Release: 1%%RELEASE_OS%% @@ -8,13 +10,8 @@ Source1: rabbitmq-server.init Source2: rabbitmq-script-wrapper Source3: rabbitmq-server.logrotate URL: http://www.rabbitmq.com/ -Vendor: LShift Ltd., Cohesive Financial Technologies LLC., Rabbit Technlogies Ltd. -%if 0%{?debian} -%else BuildRequires: erlang, python-simplejson -%endif Requires: erlang, logrotate -Packager: Hubert Plociniczak <hubert@lshift.net> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%{_arch}-root Summary: The RabbitMQ server Requires(post): %%REQUIRES%% @@ -38,11 +35,12 @@ if [ $1 -gt 1 ]; then fi %prep -%setup -n %{name}-%{version} -sed -i 's|/usr/lib/|%{_libdir}/|' %SOURCE2 +%setup -q +sed -i 's|/usr/lib/|%{_libdir}/|' %{S:1} +sed -i 's|/usr/lib/|%{_libdir}/|' %{S:2} %build -make +make %{?_smp_mflags} %install rm -rf %{buildroot} @@ -53,20 +51,14 @@ make install TARGET_DIR=%{_maindir} \ mkdir -p %{buildroot}/var/lib/rabbitmq/mnesia mkdir -p %{buildroot}/var/log/rabbitmq -mkdir -p %{buildroot}%{_initrddir} #Copy all necessary lib files etc. -install -m 0755 %SOURCE1 %{buildroot}%{_initrddir}/rabbitmq-server -chmod 0755 %{buildroot}%{_initrddir}/rabbitmq-server -sed -i 's|/usr/lib/|%{_libdir}/|' %{buildroot}%{_initrddir}/rabbitmq-server - +install -p -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/rabbitmq-server +install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmqctl +install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-server +install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-multi -install -p -D -m 0755 %SOURCE2 %{buildroot}%{_sbindir}/rabbitmqctl -install -p -D -m 0755 %SOURCE2 %{buildroot}%{_sbindir}/rabbitmq-server -install -p -D -m 0755 %SOURCE2 %{buildroot}%{_sbindir}/rabbitmq-multi - -mkdir -p %{buildroot}/etc/logrotate.d -install -m 0644 %SOURCE3 %{buildroot}/etc/logrotate.d/rabbitmq-server +install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server mkdir -p %{buildroot}/etc/rabbitmq @@ -88,13 +80,10 @@ fi # create rabbitmq user if ! getent passwd rabbitmq >/dev/null; then - useradd -r -g rabbitmq --home /var/lib/rabbitmq rabbitmq - usermod -c "RabbitMQ messaging server" rabbitmq + useradd -r -g rabbitmq -d /var/lib/rabbitmq rabbitmq \ + -c "RabbitMQ messaging server" rabbitmq fi -chown -R rabbitmq:rabbitmq /var/lib/rabbitmq -chown -R rabbitmq:rabbitmq /var/log/rabbitmq - /sbin/chkconfig --add %{name} /sbin/service rabbitmq-server start @@ -110,13 +99,15 @@ fi %files -f ../filelist.%{name}.rpm %defattr(-,root,root,-) +%attr(0750, rabbitmq, rabbitmq) %dir /var/lib/rabbitmq +%attr(0750, rabbitmq, rabbitmq) %dir /var/log/rabbitmq %dir /var/lib/rabbitmq %dir /var/log/rabbitmq %dir /etc/rabbitmq %{_rabbit_erllibdir} %{_rabbit_libdir} %{_initrddir}/rabbitmq-server -%config(noreplace) /etc/logrotate.d/rabbitmq-server +%config(noreplace) %{_sysconfdir}/logrotate.d/rabbitmq-server %doc LICENSE LICENSE-MPL-RabbitMQ INSTALL %clean |