1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#!/usr/bin/make -f
# -*- makefile -*-
DEB_DESTDIR=debian/rabbitmq-server
VERSION = $(shell dpkg-parsechangelog -SVersion | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' -e 's/+dfsg1//' | head -n 1)
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
%:
dh $@ --with python3
override_dh_auto_clean:
$(MAKE) clean distclean-manpages
rm -rf .erlang.mk
override_dh_auto_build:
$(MAKE) dist manpages
override_dh_auto_test:
echo "Disabled tests, as they download from github"
export PREFIX RMQ_ROOTDIR
override_dh_auto_install: PREFIX = /usr
override_dh_auto_install: RMQ_ROOTDIR = $(PREFIX)/lib/rabbitmq
override_dh_auto_install: RMQ_ERLAPP_DIR = $(RMQ_ROOTDIR)/lib/rabbitmq_server-$(VERSION)
override_dh_auto_install:
dh_auto_install
#dh_auto_install -- DESTDIR=$(DEB_DESTDIR) PREFIX=/usr MAN_DIR=$(DEB_DESTDIR)/usr/share/man
$(MAKE) install-bin DESTDIR=$(DEB_DESTDIR)
mkdir -p debian/rabbitmq-server/usr/sbin
sed -e 's|@SU_RABBITMQ_SH_C@|su rabbitmq -s /bin/sh -c|' \
-e 's|@STDOUT_STDERR_REDIRECTION@|> "$$RABBITMQ_LOG_BASE/startup_log" 2> "$$RABBITMQ_LOG_BASE/startup_err"|' \
< scripts/rabbitmq-script-wrapper \
> $(DEB_DESTDIR)$(PREFIX)/sbin/rabbitmqctl
chmod 0755 $(DEB_DESTDIR)$(PREFIX)/sbin/rabbitmqctl
for script in rabbitmq-server rabbitmq-plugins rabbitmq-diagnostics rabbitmq-queues rabbitmq-upgrade; do \
cp -a $(DEB_DESTDIR)$(PREFIX)/sbin/rabbitmqctl \
$(DEB_DESTDIR)$(PREFIX)/sbin/$$script; \
done
install -p -D -m 0755 scripts/rabbitmq-server.ocf \
$(DEB_DESTDIR)$(PREFIX)/lib/ocf/resource.d/rabbitmq/rabbitmq-server
# Unlocalify
# mkdir -p $(DEB_DESTDIR)$(PREFIX)/lib/rabbitmq/bin
# mv $(DEB_DESTDIR)$(PREFIX)/local/lib/erlang/bin/* $(DEB_DESTDIR)$(PREFIX)/lib/rabbitmq/bin
# mkdir -p $(DEB_DESTDIR)$(PREFIX)/sbin
# mv $(DEB_DESTDIR)$(PREFIX)/local/lib/erlang/lib/rabbitmq_server-3.6.5/sbin/* $(DEB_DESTDIR)$(PREFIX)/sbin
# rm -rf $(DEB_DESTDIR)$(PREFIX)/local
# Remove extra license files
rm -f $(DEB_DESTDIR)$(PREFIX)/lib/erlang/lib/rabbitmq_server-*/LICENSE
rm -f $(RABBIT_LIB)/LICENSE* $(RABBIT_LIB)/INSTALL*
override_dh_install:
dh_install
sed -i s/%%VSN%%/$(VERSION)/ $(CURDIR)/debian/rabbitmq-server/usr/bin/rabbitmqadmin
override_dh_auto_clean:
rm -f plugins-src/rabbitmq-server plugins/README
#dh_auto_clean
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3
|