Chris@862: #!/bin/bash Chris@862: # Chris@1532: # Run this from the build root (with sudo, I think) Chris@862: Chris@862: usage() { Chris@862: echo Chris@862: echo "Usage:" Chris@862: echo Chris@862: echo "$0 " Chris@862: echo Chris@862: echo "For example: $0 2.4cc1-1 amd64" Chris@862: echo Chris@862: exit 2 Chris@862: } Chris@862: Chris@862: version="$1" Chris@862: arch="$2" Chris@862: Chris@862: if [ -z "$version" ] || [ -z "$arch" ]; then Chris@862: usage Chris@862: fi Chris@862: Chris@1532: set -eu Chris@1532: Chris@862: program=sonic-visualiser Chris@1532: checker=vamp-plugin-load-checker Chris@1532: piper=piper-vamp-simple-server Chris@862: depdir=deploy/linux Chris@862: Chris@862: targetdir="${program}_${version}_${arch}" Chris@862: Chris@862: echo "Target dir is $targetdir" Chris@862: Chris@862: if [ -d "$targetdir" ]; then Chris@862: echo "Target directory exists, not overwriting" Chris@862: exit Chris@862: fi Chris@862: Chris@862: mkdir "$targetdir" Chris@862: Chris@862: cp -r "$depdir"/deb-skeleton/* "$targetdir"/ Chris@862: Chris@862: mkdir -p "$targetdir"/usr/bin "$targetdir"/usr/share/pixmaps Chris@862: Chris@1532: cp "$program" "$checker" "$piper" "$targetdir"/usr/bin/ Chris@862: Chris@862: cp icons/sv-icon*.svg "$targetdir"/usr/share/pixmaps/ Chris@862: cp "$program".desktop "$targetdir"/usr/share/applications/ Chris@862: cp README "$targetdir"/usr/share/doc/"$program"/ Chris@862: Chris@862: perl -i -p -e "s/Architecture: .*/Architecture: $arch/" "$targetdir"/DEBIAN/control Chris@862: Chris@864: deps=`bash "$depdir"/debian-dependencies.sh "$program"` Chris@864: Chris@864: perl -i -p -e "s/Depends: .*/$deps/" "$targetdir"/DEBIAN/control Chris@864: Chris@1080: control_ver=${version%-?} Chris@1080: Chris@1080: perl -i -p -e "s/Version: .*/Version: $control_ver/" "$targetdir"/DEBIAN/control Chris@1080: Chris@862: bash "$depdir"/fix-lintian-bits.sh "$targetdir" Chris@862: Chris@1532: dpkg-deb --build "$targetdir" && lintian "$targetdir".deb Chris@862: