changeset 470:482f468e5c93

Merge from branch v1.0-linuxbuild
author Chris Cannam
date Wed, 15 Apr 2015 12:17:08 +0100
parents 1a8ad855b7cb (current diff) 7a5e47d2f0eb (diff)
children b89f8f5347c6
files
diffstat 16 files changed, 252 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Wed Apr 01 13:11:14 2015 +0100
+++ b/.hgsubstate	Wed Apr 15 12:17:08 2015 +0100
@@ -2,6 +2,6 @@
 d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay
 0ea1d1b67396e6fea7988ed4523ba8835461564d pyin
 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds
-da520a68595a983bd206c01463549858e3389286 svapp
-24c48323c662a3631ba004f4701a328cbf753893 svcore
-fcbfc7fad1f2bb3af17de67d546ecff16dbdeef4 svgui
+b36042cb972a7c857b556517b11ba1088cd13b2f svapp
+135c5899a71f6dff31a3c847b660045c018ea36b svcore
+788b7623bfcae2b974c683313682a088c864588e svgui
--- a/configure	Wed Apr 01 13:11:14 2015 +0100
+++ b/configure	Wed Apr 15 12:17:08 2015 +0100
@@ -4363,8 +4363,8 @@
 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
 
 if test "x$GCC" = "xyes"; then
-   	CXXFLAGS_ANY="-Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe"
-        CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g"
+   	CXXFLAGS_ANY="-Wall -Wextra -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe"
+        CXXFLAGS_DEBUG="$CXXFLAGS_ANY -Werror -g"
    	CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O2"
    	CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0"
 fi
--- a/configure.ac	Wed Apr 01 13:11:14 2015 +0100
+++ b/configure.ac	Wed Apr 15 12:17:08 2015 +0100
@@ -1,5 +1,5 @@
 
-AC_INIT([Tony], 0.6, cannam@all-day-breakfast.com)
+AC_INIT([Tony], 1.0, cannam@all-day-breakfast.com)
 
 AC_CONFIG_SRCDIR(src/main.cpp)
 
@@ -53,8 +53,8 @@
 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
 
 if test "x$GCC" = "xyes"; then
-   	CXXFLAGS_ANY="-Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe"
-        CXXFLAGS_DEBUG="$CXXFLAGS_ANY -g"
+   	CXXFLAGS_ANY="-Wall -Wextra -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -Wconversion -pipe"
+        CXXFLAGS_DEBUG="$CXXFLAGS_ANY -Werror -g"
    	CXXFLAGS_RELEASE="$CXXFLAGS_ANY -g0 -O2"
    	CXXFLAGS_MINIMAL="$CXXFLAGS_ANY -g0 -O0"
 fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deb-skeleton/DEBIAN/control	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,13 @@
+Package: tony
+Priority: optional
+Maintainer: Chris Cannam <cannam@all-day-breakfast.com>
+Architecture: amd64
+Version: 1.0cc-1
+Installed-Size: 6056
+Section: contrib/sound
+Depends: libqt5core5a, libsndfile1, libsamplerate0, libfftw3-3, libbz2-1.0, libpulse0, libmad0, libid3tag0, liboggz2, libfishsound1, libasound2, liblo7, liblrdf0, libsord-0-0, libserd-0-0, vamp-plugin-sdk, librubberband2, libc6
+Description: Computer-aided melody annotation from audio recordings
+ Tony is a program for computer-aided melody annotation. It has a
+ graphical interface based on the Sonic Visualiser libraries, and uses
+ the pYIN Vamp plugin to extract pitch track and notes from monophonic
+ audio.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deb-skeleton/usr/lib/tony/README	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,1 @@
+Vamp audio analysis plugins for use by the Tony melody annotation application.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deb-skeleton/usr/share/applications/tony.desktop	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Sonic Visualiser
+Exec=sonic-visualiser %U
+Keywords=audio; sound; visualiser; sonic;
+Terminal=false
+Type=Application
+Icon=sv-icon
+Categories=Audio;AudioVideo;
+MimeType=application/x-sonicvisualiser;application/x-sonicvisualiser-layer;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg;
Binary file deploy/linux/deb-skeleton/usr/share/doc/tony/changelog.Debian.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deb-skeleton/usr/share/doc/tony/copyright	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,25 @@
+
+Tony was developed at Queen Mary, University of London in
+collaboration with New York University.
+
+Code copyright 2005-2015 Chris Cannam, Queen Mary University of
+London, and the Tony project authors: Matthias Mauch, George Fazekas,
+Justin Salamon, and Rachel Bittner, except where indicated in the
+individual source files. Thanks also to Simon Dixon and Juan Bello.
+
+If you make use of this software for any public or commercial purpose,
+we ask you to kindly mention the authors and Queen Mary, University of
+London in your user-visible documentation. We're very happy to see
+this sort of use but would much appreciate being credited, separately
+from the requirements of the software license itself (see below).
+
+If you make use of this software for academic purposes, please cite
+one of the publications indicated on the Publications page:
+https://code.soundsoftware.ac.uk/publications?project_id=tony
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or (at
+your option) any later version. See the file /usr/share/common-licenses/GPL-2 
+for more information.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/debian-dependencies.sh	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+target=$1
+
+if [ ! -f "$target" ]; then 
+    echo "Usage: $0 target-executable"
+    exit 1
+fi
+
+pfile=/tmp/packages_$$
+rfile=/tmp/redundant_$$
+
+trap "rm -f $pfile $rfile" 0
+echo 1>&2
+
+ldd "$target" | awk '{ print $3; }' | grep '^/' | while read lib; do
+    if test -n "$lib" ; then
+	dpkg-query -S "$lib"
+    fi
+    done | grep ': ' | awk -F: '{ print $1 }' | sort | uniq > $pfile
+
+echo "Packages providing required libraries:" 1>&2
+cat $pfile 1>&2
+echo 1>&2
+
+for p in `cat $pfile`; do 
+    echo Looking at $p 1>&2
+    apt-cache showpkg "$p" | grep '^  ' | grep ',' | awk -F, '{ print $1; }' | \
+	while read d; do 
+	    if grep -q '^'$d'$' $pfile; then
+		echo $p
+	    fi
+    done
+done | sort | uniq > $rfile
+
+echo "Packages that can be eliminated because other packages depend on them:" 1>&2
+cat $rfile 1>&2
+echo 1>&2
+
+cat $pfile $rfile | sort | uniq -u | sed 's/$/,/' | fmt -1000 | sed 's/^/Depends: /' | sed 's/,$/, libc6/'
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deploy-deb.sh	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,66 @@
+#!/bin/bash
+# 
+# Run this from the build root
+
+set -e
+
+usage() {
+    echo
+    echo "Usage:"
+    echo
+    echo "$0 <version> <architecture>"
+    echo
+    echo "For example: $0 1.0cc1-1 amd64"
+    echo
+    exit 2
+}
+
+version="$1"
+arch="$2"
+
+if [ -z "$version" ] || [ -z "$arch" ]; then
+    usage
+fi
+
+set -u
+
+program=tony
+plugins="chp pyin"
+
+depdir=deploy/linux
+
+targetdir="${program}_${version}_${arch}"
+
+echo "Target dir is $targetdir"
+
+if [ -d "$targetdir" ]; then
+    echo "Target directory exists, not overwriting"
+    exit
+fi
+
+mkdir "$targetdir"
+
+cp -r "$depdir"/deb-skeleton/* "$targetdir"/
+
+mkdir -p "$targetdir"/usr/bin "$targetdir"/usr/share/pixmaps
+
+cp "$program" "$targetdir"/usr/bin/
+
+for plug in $plugins; do
+    cp "$plug/$plug.so" "$targetdir"/usr/lib/"$program"/
+done
+
+cp icons/"$program"-128x128.png "$targetdir"/usr/share/pixmaps/
+cp "$program".desktop "$targetdir"/usr/share/applications/
+cp README "$targetdir"/usr/share/doc/"$program"/
+
+perl -i -p -e "s/Architecture: .*/Architecture: $arch/" "$targetdir"/DEBIAN/control
+
+deps=`bash "$depdir"/debian-dependencies.sh "$program"`
+
+perl -i -p -e "s/Depends: .*/$deps/" "$targetdir"/DEBIAN/control
+
+bash "$depdir"/fix-lintian-bits.sh "$targetdir"
+
+sudo dpkg-deb --build "$targetdir" && lintian "$targetdir".deb
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/docker/32/Dockerfile	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,24 @@
+FROM 32bit/ubuntu:14.04
+MAINTAINER Chris Cannam <cannam@all-day-breakfast.com>
+RUN apt-get update && apt-get install -y \
+    build-essential \
+    mercurial \
+    qtbase5-dev qt5-default \
+    libsndfile1-dev libsamplerate0-dev \
+    libfftw3-dev \
+    libbz2-dev \
+    libjack-dev libjack0 libpulse-dev \
+    libmad0-dev libid3tag0-dev \
+    liboggz2-dev libfishsound1-dev \
+    libasound2-dev \
+    liblo-dev liblrdf0-dev libsord-dev libserd-dev \
+    vamp-plugin-sdk librubberband-dev \
+    libboost-dev libboost-test-dev \
+    lintian \
+    w3m
+RUN hg clone -u v1.0-linuxbuild https://code.soundsoftware.ac.uk/hg/tony /opt/tony
+WORKDIR /opt/tony
+RUN ./configure && make
+RUN make -C chp -f Makefile.linux
+RUN make -C pyin -f Makefile.linux64
+RUN bash deploy/linux/deploy-deb.sh 1.0cc1-1 i386
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/docker/64/Dockerfile	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,24 @@
+FROM ubuntu:14.04
+MAINTAINER Chris Cannam <cannam@all-day-breakfast.com>
+RUN apt-get update && apt-get install -y \
+    build-essential \
+    mercurial \
+    qtbase5-dev qt5-default \
+    libsndfile1-dev libsamplerate0-dev \
+    libfftw3-dev \
+    libbz2-dev \
+    libjack-dev libjack0 libpulse-dev \
+    libmad0-dev libid3tag0-dev \
+    liboggz2-dev libfishsound1-dev \
+    libasound2-dev \
+    liblo-dev liblrdf0-dev libsord-dev libserd-dev \
+    vamp-plugin-sdk librubberband-dev \
+    libboost-dev libboost-test-dev \
+    lintian \
+    w3m
+RUN hg clone -u v1.0-linuxbuild https://code.soundsoftware.ac.uk/hg/tony /opt/tony
+WORKDIR /opt/tony
+RUN ./configure && make
+RUN make -C chp -f Makefile.linux
+RUN make -C pyin -f Makefile.linux64
+RUN bash deploy/linux/deploy-deb.sh 1.0cc1-1 amd64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/docker/README	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,13 @@
+
+These Dockerfiles create images that contain .deb builds for
+Tony. That is, the entire build is run in the process of creating the
+image, and the resulting image contains the built .deb file in the
+/opt/tony directory.
+
+Run:
+
+sudo docker build -t tony:build-v1.0-amd64 64
+sudo docker build -t tony:build-v1.0-i386 32
+
+to create images ("docker images" lists them) with the builds in them.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/fix-lintian-bits.sh	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+dir=$1
+
+[ -d "$dir" ] || exit 1
+
+strip "$dir"/usr/bin/*
+strip "$dir"/usr/lib/*/*.so
+
+sz=`du -sx --exclude DEBIAN "$dir" | awk '{ print $1; }'`
+perl -i -p -e "s/Installed-Size: .*/Installed-Size: $sz/" "$dir"/DEBIAN/control
+
+find "$dir" -name \*~ -exec rm \{\} \;
+
+sudo chown -R root.root "$dir"/*
+
+sudo chmod -R g-w "$dir"/*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tony.desktop	Wed Apr 15 12:17:08 2015 +0100
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Tony
+Exec=tony %U
+Keywords=audio; sound; melody; singing;
+Terminal=false
+Type=Application
+Icon=tony-128x128
+Categories=Audio;AudioVideo;
+MimeType=application/x-tony;application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/x-flac;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-wav;audio/wav;application/ogg;audio/x-vorbis+ogg;
--- a/version.h	Wed Apr 01 13:11:14 2015 +0100
+++ b/version.h	Wed Apr 15 12:17:08 2015 +0100
@@ -1,1 +1,1 @@
-#define TONY_VERSION "1.0"
+#define TONY_VERSION "0.6"