With this patch it's possible to run `dpkg-buildpackage` any number
number of times from single source directory. Otherwise `dpkg-source`
thinks that sources were modified and fails to execute.
`clean-unpacked-source-dist` is needed because `make clean` doesn't
descend into `deps/` folder, and doing `make clean APPS_DIR=deps` breaks
on `licensing/` which doesn't have makefile.
Calling `patch-sockjs` is necessary to be sure that no files in source dist
tarball will not be touched during build.
Our packaging Makefiles already take care of not exporting `DEPS_DIR`.
This is to make sure a user setting (eg. `DEPS_DIR` set globally in the
environment) doesn't break the package build either.
A Debian package is built with a Makefile, `debian/rules`. This Makefile
inherited all variables defined on the command line, even though we
unexported the dangerous ones.
We need to unset `MAKEOVERRIDES` to prevent GNU Make from passing them
in `MAKEFLAGS`.
Everything comes from the rabbitmq-server repository. The goals of this
move are:
1. separate unrelated files: the broker sources and release
handling comprising plugins;
2. resolve an important dependency cycle: plugins depend on the
broker to run, but the broker depends on plugins to build a
release.
[#130659985]