Chris@862: #!/bin/bash Chris@862: # Chris@862: # Run this from the build root 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@862: program=sonic-visualiser 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@862: cp "$program" "$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@862: bash "$depdir"/fix-lintian-bits.sh "$targetdir" Chris@862: Chris@862: sudo dpkg-deb --build "$targetdir" && lintian "$targetdir".deb Chris@862: