summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert@lshift.net>2009-02-20 15:31:32 +0000
committerHubert Plociniczak <hubert@lshift.net>2009-02-20 15:31:32 +0000
commit383e77fe4488c59c335921b0b323b797d9b37623 (patch)
tree89aa676e7115845892b475d6370fb418c71eba07
parent0a32cc48e52e7bcb0a9c21e695b19aa164d39bec (diff)
downloadrabbitmq-server-383e77fe4488c59c335921b0b323b797d9b37623.tar.gz
Use _locastatedir and _sysconfdir macros in all possible places.bug20329
-rw-r--r--packaging/RPMS/Fedora/Makefile2
-rw-r--r--packaging/RPMS/Fedora/rabbitmq-server.spec20
2 files changed, 11 insertions, 11 deletions
diff --git a/packaging/RPMS/Fedora/Makefile b/packaging/RPMS/Fedora/Makefile
index af73cc49..9fe91b98 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 '_sysconfdir /etc'
+DEFINES=--define '_topdir $(TOP_DIR)' --define '_tmppath $(TOP_DIR)/tmp' --define '_sysconfdir /etc' --define '_localstatedir /var'
ifndef RPM_OS
RPM_OS=fedora
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.spec b/packaging/RPMS/Fedora/rabbitmq-server.spec
index b9693092..d8623165 100644
--- a/packaging/RPMS/Fedora/rabbitmq-server.spec
+++ b/packaging/RPMS/Fedora/rabbitmq-server.spec
@@ -49,8 +49,8 @@ make install TARGET_DIR=%{_maindir} \
SBIN_DIR=%{buildroot}%{_rabbit_libdir}/bin \
MAN_DIR=%{buildroot}%{_mandir}
-mkdir -p %{buildroot}/var/lib/rabbitmq/mnesia
-mkdir -p %{buildroot}/var/log/rabbitmq
+mkdir -p %{buildroot}%{_localstatedir}/lib/rabbitmq/mnesia
+mkdir -p %{buildroot}%{_localstatedir}/log/rabbitmq
#Copy all necessary lib files etc.
install -p -D -m 0755 %{S:1} %{buildroot}%{_initrddir}/rabbitmq-server
@@ -60,7 +60,7 @@ install -p -D -m 0755 %{S:2} %{buildroot}%{_sbindir}/rabbitmq-multi
install -p -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/logrotate.d/rabbitmq-server
-mkdir -p %{buildroot}/etc/rabbitmq
+mkdir -p %{buildroot}%{_sysconfdir}/rabbitmq
rm %{_maindir}/LICENSE %{_maindir}/LICENSE-MPL-RabbitMQ %{_maindir}/INSTALL
@@ -68,7 +68,7 @@ rm %{_maindir}/LICENSE %{_maindir}/LICENSE-MPL-RabbitMQ %{_maindir}/INSTALL
rm -f %{_builddir}/filelist.%{name}.rpm
echo '%defattr(-,root,root, -)' >> %{_builddir}/filelist.%{name}.rpm
(cd %{buildroot}; \
- find . -type f ! -regex '\./etc.*' \
+ find . -type f ! -regex '\.%{_sysconfdir}.*' \
! -regex '\.\(%{_rabbit_erllibdir}\|%{_rabbit_libdir}\).*' \
| sed -e 's/^\.//' >> %{_builddir}/filelist.%{name}.rpm)
@@ -80,7 +80,7 @@ fi
# create rabbitmq user
if ! getent passwd rabbitmq >/dev/null; then
- useradd -r -g rabbitmq -d /var/lib/rabbitmq rabbitmq \
+ useradd -r -g rabbitmq -d %{_localstatedir}/lib/rabbitmq rabbitmq \
-c "RabbitMQ messaging server" rabbitmq
fi
@@ -99,11 +99,11 @@ 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
+%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/lib/rabbitmq
+%attr(0750, rabbitmq, rabbitmq) %dir %{_localstatedir}/log/rabbitmq
+%dir %{_localstatedir}/lib/rabbitmq
+%dir %{_localstatedir}/log/rabbitmq
+%dir %{_sysconfdir}/rabbitmq
%{_rabbit_erllibdir}
%{_rabbit_libdir}
%{_initrddir}/rabbitmq-server