Introduce a Docker-based build system for Debian packages to streamline the build process and ensure consistency across environments. This change mitigates potential build failures due to environment discrepancies and simplifies the setup for new developers. - Extend .gitignore to exclude debhelper and build artifacts - Add build.sh script to automate Docker-based package building - Update debian/control to include libyaml-dev as a build dependency - Create debian/files to track generated Debian packages - Add Dockerfile to define the build environment with necessary dependencies Signed-off-by: Glenn Y. Rolland <glenux@glenux.net>
19 lines
623 B
Bash
19 lines
623 B
Bash
#!/bin/sh
|
|
|
|
# References:
|
|
# - https://www.debian.org/doc/manuals/maint-guide/build.en.html for base principles
|
|
# - https://www.patreon.com/posts/building-debian-23177439 for debuild output dir
|
|
#
|
|
set -ue
|
|
|
|
mkdir -p _build || true
|
|
|
|
docker build -t debbuilder --file docker/Dockerfile .
|
|
docker run -it -v "$(pwd):/app" -v "$(pwd)/_build:/_build" debbuilder \
|
|
sh -c "ARTIFACTS_DIR=/app/_build debuild --preserve-envvar=ARTIFACTS_DIR -us -uc --buildinfo-option=-u/app/_build --changes-option=-u/app/_build" \
|
|
|| docker run -it -v "$(pwd):/app" debbuilder
|
|
|
|
# dpkg-buildpackage -us -uc
|
|
# debuild
|
|
# git-buildpackage
|
|
echo SUCCESS
|