If we're building a package for more than one architecture and
the source package provides architecture 'any' *and* 'all' binary
packages at the same time we've to build on all but one
architecture using the -B build option (see dpkg-buildpackage(1)
for details).
Setting MAIN_ARCHITECTURE allows choosing the main architecture,
which is the one providing the "Architecture: all" binary
packages. If unset it defaults to the architecture of the host
system.
Restructure the code to make it less ugly...
Setting TRUNK_RELEASE allows copying each package to
a specific repository so you get a "release-trunk"
feature to point sources.list to a repository featuring
always the latest package versions.
Don't build i386 with "-B" but use the "-b" as well.
Also don't care about arch all vs. arch specific packages during
file removal any longer.
This is supposed to fix configuration matrix builds in Jenkins,
where we're building the package for multiple architectures.
Otherwise accessing the changes file will fail if architecture
is set to "all" and building is done on a amd64 host, since the
changes file is named *_amd64.changes.
${WORKSPACE}/binaries/: we want to separate sources and binaries
so we don't conflict with each other. Therefore put the files we
get from cowbuilder into ${WORKSPACE}/binaries/
remove files of previous runs: we get rid of source files from
previous runs, since Copy Artifact Plugin copies files but if
building fails we find multiple versions inside the workspace.
Since we might want to build older versions as well there is no
simple heuristic we could rely on, therefore get rid of old
files.
handle missing packages: When source package "foo" provides
binary packages "bar" and "baz" in version 0.23 but version 0.42
doesn't provide "baz" any longer, then the no-longer-present
binary package "baz" will stay in the archive since it's not
longer listed in 0.42. In case we even build an version older
than 0.23 providing baz then adding the package will fail at all.
Therefore we get rid of binary packages from the archive that are
no longer build by the current version.