docker-based debian package build

This commit is contained in:
Jakob Ketterl 2019-12-08 19:00:34 +01:00
parent 527eccd3c6
commit 21cb0e8feb
4 changed files with 43 additions and 1 deletions

13
build-debian-package.sh Executable file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -euo pipefail
SIGN_KEY_ID=EC56CED77C05107E4C416EF8173873AE062F3A10
SIGN_KEY=$(gpg --armor --export-secret-key $SIGN_KEY_ID)
docker build --pull -t openwebrx-debian-builder:latest -f docker/Dockerfiles/Dockerfile-debian-builder .
docker run -it --name openwebrx-debian-builder -e SIGN_KEY="$SIGN_KEY" -e SIGN_KEY_ID="$SIGN_KEY_ID" openwebrx-debian-builder:latest
mkdir -p packages/buster
docker cp openwebrx-debian-builder:/packages.tar.gz .
tar xvfz packages.tar.gz -C packages/buster
rm packages.tar.gz
docker rm openwebrx-debian-builder

2
debian/control vendored
View File

@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 10), dh-python, python3 (>= 3.6), dh-systemd (>= 1.
Package: openwebrx
Architecture: all
Depends: python3 (>= 3.6), csdr (>= 0.15), netcat, owrx-connector (>= 0.1)
Depends: python3 (>= 3.6), python3-pkg-resources, csdr (>= 0.15), netcat, owrx-connector (>= 0.1)
Recommends: digiham (>= 0.2), dsd (>= 1.7)
Description: multi-user web sdr
Open source, multi-user SDR receiver with a web interface

View File

@ -0,0 +1,13 @@
FROM debian:buster
RUN apt-get update && \
apt-get install -y cmake build-essential devscripts debsigs dh-python python3 python3-setuptools dh-systemd git && \
rm -rf /var/lib/apt/lists/*
ADD docker/scripts/build-debian-package.sh /
RUN git clone https://github.com/jketterl/openwebrx.git /openwebrx
WORKDIR /openwebrx
CMD ["/build-debian-package.sh"]

View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail
debuild -uc -us
cd ..
export GPG_TTY=$(tty)
gpg --batch --import <(echo "$SIGN_KEY")
for DEB in `ls *.deb`; do
debsigs --sign=maint -k $SIGN_KEY_ID $DEB
done
dpkg-deb -I *.deb
tar cvfz packages.tar.gz *.deb