Skip to content

Commit

Permalink
bug22914 merged into default
Browse files Browse the repository at this point in the history
  • Loading branch information
Marek Majkowski committed Jul 14, 2010
2 parents c765132 + 354c373 commit 3c75397
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packaging/macports/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,18 @@ $(DEST)/Portfile: Portfile.in
-f checksums.sed <$^ >$@
rm checksums.sed

# The purpose of the intricate substitution below is to set up similar
# environment vars to the ones that su will on Linux. On OS X, we
# have to use the -m option to su in order to be able to set the shell
# (which for the rabbitmq user would otherwise be /dev/null). But the
# -m option means that *all* environment vars get preserved. Erlang
# needs vars such as HOME to be set. So we have to set them
# explicitly.
macports: dirs $(DEST)/Portfile
for f in rabbitmq-asroot-script-wrapper rabbitmq-script-wrapper ; do \
cp $(COMMON_DIR)/$$f $(DEST)/files ; \
done
sed -i -e 's|@SU_RABBITMQ_SH_C@|SHELL=/bin/sh su -m rabbitmq -c|' \
sed -i -e 's|@SU_RABBITMQ_SH_C@|SHELL=/bin/sh HOME=/var/lib/rabbitmq USER=rabbitmq LOGNAME=rabbitmq PATH="$$(eval `PATH=MACPORTS_PREFIX/bin /usr/libexec/path_helper -s`; echo $$PATH)" su -m rabbitmq -c|' \
$(DEST)/files/rabbitmq-script-wrapper
cp patch-org.macports.rabbitmq-server.plist.diff $(DEST)/files
if [ -n "$(MACPORTS_USERHOST)" ] ; then \
Expand All @@ -52,4 +59,4 @@ macports: dirs $(DEST)/Portfile
fi

clean:
rm -rf $(DEST) checksums.sed
rm -rf $(MACPORTS_DIR) checksums.sed
2 changes: 2 additions & 0 deletions packaging/macports/Portfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ post-destroot {
xinstall -m 555 ${filespath}/rabbitmq-asroot-script-wrapper \
${wrappersbin}/rabbitmq-activate-plugins

reinplace -E "s:MACPORTS_PREFIX/bin:${prefix}/bin:" \
${wrappersbin}/rabbitmq-multi
reinplace -E "s:/usr/lib/rabbitmq/bin/:${prefix}/lib/rabbitmq/bin/:" \
${wrappersbin}/rabbitmq-multi
reinplace -E "s:/var/lib/rabbitmq:${prefix}/var/lib/rabbitmq:" \
Expand Down

0 comments on commit 3c75397

Please sign in to comment.