Mercurial > hg > sonic-annotator
annotate deploy/linux/deploy-deb.sh @ 343:3c01ac72c943 bqaudiostream
Seems AppVeyor still doesn't have Qt 5.11.3 yet
author | Chris Cannam |
---|---|
date | Mon, 04 Feb 2019 09:41:07 +0000 |
parents | 7dd6795af5e6 |
children |
rev | line source |
---|---|
Chris@252 | 1 #!/bin/bash |
Chris@252 | 2 # |
Chris@300 | 3 # Run this from the build root (with sudo, I think) |
Chris@252 | 4 |
Chris@252 | 5 usage() { |
Chris@252 | 6 echo |
Chris@252 | 7 echo "Usage:" |
Chris@252 | 8 echo |
Chris@252 | 9 echo "$0 <version> <architecture>" |
Chris@252 | 10 echo |
Chris@252 | 11 echo "For example: $0 2.4cc1-1 amd64" |
Chris@252 | 12 echo |
Chris@252 | 13 exit 2 |
Chris@252 | 14 } |
Chris@252 | 15 |
Chris@252 | 16 version="$1" |
Chris@252 | 17 arch="$2" |
Chris@252 | 18 |
Chris@252 | 19 if [ -z "$version" ] || [ -z "$arch" ]; then |
Chris@252 | 20 usage |
Chris@252 | 21 fi |
Chris@252 | 22 |
Chris@300 | 23 set -eu |
Chris@300 | 24 |
Chris@252 | 25 program=sonic-annotator |
Chris@252 | 26 depdir=deploy/linux |
Chris@252 | 27 |
Chris@252 | 28 targetdir="${program}_${version}_${arch}" |
Chris@252 | 29 |
Chris@252 | 30 echo "Target dir is $targetdir" |
Chris@252 | 31 |
Chris@252 | 32 if [ -d "$targetdir" ]; then |
Chris@252 | 33 echo "Target directory exists, not overwriting" |
Chris@252 | 34 exit |
Chris@252 | 35 fi |
Chris@252 | 36 |
Chris@252 | 37 mkdir "$targetdir" |
Chris@252 | 38 |
Chris@252 | 39 cp -r "$depdir"/deb-skeleton/* "$targetdir"/ |
Chris@252 | 40 |
Chris@252 | 41 mkdir -p "$targetdir"/usr/bin |
Chris@252 | 42 |
Chris@252 | 43 cp "$program" "$targetdir"/usr/bin/ |
Chris@252 | 44 |
Chris@252 | 45 cp README "$targetdir"/usr/share/doc/"$program"/ |
Chris@252 | 46 |
Chris@252 | 47 perl -i -p -e "s/Architecture: .*/Architecture: $arch/" "$targetdir"/DEBIAN/control |
Chris@252 | 48 |
Chris@252 | 49 deps=`bash "$depdir"/debian-dependencies.sh "$program"` |
Chris@252 | 50 |
Chris@252 | 51 perl -i -p -e "s/Depends: .*/$deps/" "$targetdir"/DEBIAN/control |
Chris@252 | 52 |
Chris@252 | 53 control_ver=${version%-?} |
Chris@252 | 54 |
Chris@252 | 55 perl -i -p -e "s/Version: .*/Version: $control_ver/" "$targetdir"/DEBIAN/control |
Chris@252 | 56 |
Chris@252 | 57 bash "$depdir"/fix-lintian-bits.sh "$targetdir" |
Chris@252 | 58 |
Chris@300 | 59 dpkg-deb --build "$targetdir" && lintian "$targetdir".deb |
Chris@252 | 60 |