Mercurial > hg > sonic-visualiser
comparison deploy/linux/deploy-deb.sh @ 870:ff52a5b766f7
Merge
author | Chris Cannam |
---|---|
date | Wed, 24 Sep 2014 18:55:37 +0100 |
parents | d47aa2977d7a |
children | 8b63b44c3a91 |
comparison
equal
deleted
inserted
replaced
869:b09988dc654b | 870:ff52a5b766f7 |
---|---|
1 #!/bin/bash | |
2 # | |
3 # Run this from the build root | |
4 | |
5 usage() { | |
6 echo | |
7 echo "Usage:" | |
8 echo | |
9 echo "$0 <version> <architecture>" | |
10 echo | |
11 echo "For example: $0 2.4cc1-1 amd64" | |
12 echo | |
13 exit 2 | |
14 } | |
15 | |
16 version="$1" | |
17 arch="$2" | |
18 | |
19 if [ -z "$version" ] || [ -z "$arch" ]; then | |
20 usage | |
21 fi | |
22 | |
23 program=sonic-visualiser | |
24 depdir=deploy/linux | |
25 | |
26 targetdir="${program}_${version}_${arch}" | |
27 | |
28 echo "Target dir is $targetdir" | |
29 | |
30 if [ -d "$targetdir" ]; then | |
31 echo "Target directory exists, not overwriting" | |
32 exit | |
33 fi | |
34 | |
35 mkdir "$targetdir" | |
36 | |
37 cp -r "$depdir"/deb-skeleton/* "$targetdir"/ | |
38 | |
39 mkdir -p "$targetdir"/usr/bin "$targetdir"/usr/share/pixmaps | |
40 | |
41 cp "$program" "$targetdir"/usr/bin/ | |
42 | |
43 cp icons/sv-icon*.svg "$targetdir"/usr/share/pixmaps/ | |
44 cp "$program".desktop "$targetdir"/usr/share/applications/ | |
45 cp README "$targetdir"/usr/share/doc/"$program"/ | |
46 | |
47 perl -i -p -e "s/Architecture: .*/Architecture: $arch/" "$targetdir"/DEBIAN/control | |
48 | |
49 deps=`bash "$depdir"/debian-dependencies.sh "$program"` | |
50 | |
51 perl -i -p -e "s/Depends: .*/$deps/" "$targetdir"/DEBIAN/control | |
52 | |
53 bash "$depdir"/fix-lintian-bits.sh "$targetdir" | |
54 | |
55 sudo dpkg-deb --build "$targetdir" && lintian "$targetdir".deb | |
56 |