# HG changeset patch # User Chris Cannam # Date 1542799543 0 # Node ID f69819b5c248cdea103e69f754080c9c0f04dcca # Parent 708ae77f5b783183c0b4bb4d5a1765bd26b43c64 Experimental Docker deb package build diff -r 708ae77f5b78 -r f69819b5c248 deploy/linux/build-and-test-appimage.sh --- a/deploy/linux/build-and-test-appimage.sh Fri Nov 16 14:32:41 2018 +0000 +++ b/deploy/linux/build-and-test-appimage.sh Wed Nov 21 11:25:43 2018 +0000 @@ -33,9 +33,9 @@ container=$(sudo docker create "$dockertag") -sudo docker cp "$container":output.tar "$outdir" +sudo docker cp "$container":output-appimage.tar "$outdir" sudo docker rm "$container" -( cd "$outdir" ; tar xf output.tar && rm -f output.tar ) +( cd "$outdir" ; tar xf output-appimage.tar && rm -f output-appimage.tar ) sudo docker build -f "$dockerdir"/Dockerfile_test_appimage.gen "$dockerdir" diff -r 708ae77f5b78 -r f69819b5c248 deploy/linux/build-and-test-deb.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/build-and-test-deb.sh Wed Nov 21 11:25:43 2018 +0000 @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Docker required + +set -eu + +current=$(hg id | awk '{ print $1; }') +release=$(perl -p -e 's/^[^"]*"([^"]*)".*$/$1/' version.h) + +case "$current" in + *+) echo "ERROR: Current working copy has been modified - unmodified copy required so we know we can check it out separately and obtain the same contents"; exit 2;; + *);; +esac + +echo +echo "Building Debian deb archive from revision $current..." + +dockerdir=deploy/linux/docker + +cat "$dockerdir"/Dockerfile_deb.in | \ + perl -p -e "s/\[\[REVISION\]\]/$current/g" | \ + perl -p -e "s/\[\[RELEASE\]\]/$release/g" > \ + "$dockerdir"/Dockerfile_deb.gen + +cat "$dockerdir"/Dockerfile_test_deb.in | \ + perl -p -e "s/\[\[REVISION\]\]/$current/g" | \ + perl -p -e "s/\[\[RELEASE\]\]/$release/g" > \ + "$dockerdir"/Dockerfile_test_deb.gen + +dockertag="cannam/sonic-visualiser-deb-$current" + +sudo docker build -t "$dockertag" -f "$dockerdir"/Dockerfile_deb.gen "$dockerdir" + +outdir="$dockerdir/output" +mkdir -p "$outdir" + +container=$(sudo docker create "$dockertag") + +sudo docker cp "$container":output-deb.tar "$outdir" +sudo docker rm "$container" + +( cd "$outdir" ; tar xf output-deb.tar && rm -f output-deb.tar ) + +sudo docker build -f "$dockerdir"/Dockerfile_test_deb.gen "$dockerdir" diff -r 708ae77f5b78 -r f69819b5c248 deploy/linux/docker/Dockerfile_appimage.in --- a/deploy/linux/docker/Dockerfile_appimage.in Fri Nov 16 14:32:41 2018 +0000 +++ b/deploy/linux/docker/Dockerfile_appimage.in Wed Nov 21 11:25:43 2018 +0000 @@ -66,4 +66,4 @@ RUN make -j3 RUN deploy/linux/deploy-appimage.sh -RUN tar cvf output.tar *.AppImage && cp output.tar .. +RUN tar cvf output-appimage.tar *.AppImage && cp output-appimage.tar .. diff -r 708ae77f5b78 -r f69819b5c248 deploy/linux/docker/Dockerfile_deb.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/docker/Dockerfile_deb.in Wed Nov 21 11:25:43 2018 +0000 @@ -0,0 +1,57 @@ +# This pulls the latest versions of capnp & SV from repos - so you +# will need to defeat the Docker cache by destroying the container +# each time you want to update it +# +FROM ubuntu:14.04 +MAINTAINER Chris Cannam +RUN apt-get update && \ + apt-get install -y \ + software-properties-common \ + build-essential \ + libbz2-dev \ + libfftw3-dev \ + libfishsound1-dev \ + libid3tag0-dev \ + liblo-dev \ + liblrdf0-dev \ + libmad0-dev \ + liboggz2-dev \ + libpulse-dev \ + libasound2-dev \ + libjack-dev \ + libsamplerate-dev \ + libsndfile-dev \ + libsord-dev \ + libxml2-utils \ + libgl1-mesa-dev \ + raptor-utils \ + librubberband-dev \ + portaudio19-dev \ + qt5-default libqt5svg5-dev \ + git \ + mercurial \ + curl wget \ + mlton \ + autoconf automake libtool lintian + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +RUN hg clone -r[[REVISION]] https://code.soundsoftware.ac.uk/hg/sonic-visualiser + +RUN git clone https://github.com/sandstorm-io/capnproto +WORKDIR capnproto +RUN git checkout v0.6.1 +WORKDIR c++ +RUN autoreconf -i && ./configure && make -j3 && make install + +WORKDIR ../../sonic-visualiser +RUN ./configure +RUN make -j3 + +RUN deploy/linux/deploy-deb.sh [[RELEASE]]cc1-1 amd64 +RUN tar cvf output-deb.tar *.deb && cp output-deb.tar .. diff -r 708ae77f5b78 -r f69819b5c248 deploy/linux/docker/Dockerfile_test_deb.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/deploy/linux/docker/Dockerfile_test_deb.in Wed Nov 21 11:25:43 2018 +0000 @@ -0,0 +1,6 @@ +FROM ubuntu:18.04 +RUN apt-get update +ADD output/sonic-visualiser_[[RELEASE]]_amd64.deb SV.AppImage +RUN apt install sonic-visualiser*.deb +RUN /usr/bin/sonic-visualiser --version +