Deb: build-deb now builds a .deb for Ubuntu 18

It builds the builder image first, then proceeeds to building .deb
inside it, and the result is put into the parent (../) directory.
This commit is contained in:
Dmitry Maksyoma 2021-01-07 21:57:53 +13:00
parent 702f817845
commit 59382451dc
3 changed files with 21 additions and 3 deletions

View File

@ -2,5 +2,10 @@
set -e
dpkg-buildpackage -us -uc -b
lintian ../*.deb
cd "$(dirname "$0")/.."
docker build -t debbuilder_ubuntu:18.04 -f \
builder/dockerfile.ubuntu1804.deb.build .
deb_output_dir=$(cd .. && echo $PWD)
docker run --rm -v "$deb_output_dir":/src debbuilder_ubuntu:18.04 /bin/bash -c '/src/*/builder/build-deb-inside-docker'

11
builder/build-deb-inside-docker Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
cd "$(dirname "$0")/.."
# Auto-install build-deps again
# echo YYY | mk-build-deps --install debian/control
dpkg-buildpackage -us -uc -b
lintian ../*.deb

View File

@ -3,6 +3,8 @@ FROM ubuntu:18.04
RUN apt-get update && \
apt-get -y install vim build-essential devscripts equivs
# Install build-deps for the package.
COPY ./debian/control /tmp
RUN echo YYY | mk-build-deps --install --remove /tmp/control
RUN echo YYY | mk-build-deps --install /tmp/control
USER 1000