Building debug packages on ubuntu requires the "debug" option to be
specified explicitly. Debug packages on Ubuntu have the .ddeb extension,
so let's make sure we handle that by copying the .ddeb packages in the
build script as well.
DEB_BUILD_OPTIONS=$(awk '$1=$1' <<<"\
$( ((WITH_TESTS)) || echo nocheck) \
$( ((WITH_DOCS)) || echo nodoc) \
- $( ((WITH_DEBUG)) || echo nostrip) \
+ $( ((WITH_DEBUG)) && echo debug || echo nostrip) \
terse \
optimize=-lto \
hardening=-fortify \
build
fi
-cp ../*.deb "$PACKAGEDIR"
-cp ../*.deb "$OUTPUTDIR"
+(
+ shopt -s nullglob
+ cp ../*.deb ../*.ddeb "$PACKAGEDIR"
+ cp ../*.deb ../*.ddeb "$OUTPUTDIR"
+)