changeset 862:129b679734d0

Add deploy script
author Chris Cannam
date Wed, 24 Sep 2014 12:08:51 +0100 (2014-09-24)
parents d191ba54592e
children ac805901f02a
files deploy/linux/control.example deploy/linux/deploy-deb.sh deploy/linux/fix-lintian-bits.sh
diffstat 3 files changed, 53 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/linux/control.example	Wed Sep 24 11:34:05 2014 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-Package: sonic-visualiser
-Priority: optional
-Maintainer: Chris Cannam <cannam@all-day-breakfast.com>
-Architecture: PLACE ARCHITECTURE HERE i386 or amd64
-Version: PLACE VERSION HERE e.g. 2.2cc-1
-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
-Description: View and analyse the contents of music audio files
- Sonic Visualiser is an application for viewing and analysing the contents of mu
-sic audio files. It was developed at the Centre for Digital Music at Queen Mary,
- University of London. Our aim is for it to be the first program you reach for w
-hen want to study a musical recording rather than simply listen to it.
- We hope Sonic Visualiser will be of particular interest to musicologists, archi
-vists, signal-processing researchers and anyone else looking for a friendly way 
-to take a look at what lies inside the audio file.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/linux/deploy-deb.sh	Wed Sep 24 12:08:51 2014 +0100
@@ -0,0 +1,52 @@
+#!/bin/bash
+# 
+# Run this from the build root
+
+usage() {
+    echo
+    echo "Usage:"
+    echo
+    echo "$0 <version> <architecture>"
+    echo
+    echo "For example: $0 2.4cc1-1 amd64"
+    echo
+    exit 2
+}
+
+version="$1"
+arch="$2"
+
+if [ -z "$version" ] || [ -z "$arch" ]; then
+    usage
+fi
+
+program=sonic-visualiser
+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/
+
+cp icons/sv-icon*.svg "$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
+
+bash "$depdir"/fix-lintian-bits.sh "$targetdir"
+
+sudo dpkg-deb --build "$targetdir" && lintian "$targetdir".deb
+
--- a/deploy/linux/fix-lintian-bits.sh	Wed Sep 24 11:34:05 2014 +0100
+++ b/deploy/linux/fix-lintian-bits.sh	Wed Sep 24 12:08:51 2014 +0100
@@ -13,3 +13,4 @@
 
 sudo chown -R root.root "$dir"/*
 
+sudo chmod -R g-w "$dir"/*