myx-cmake/build_deb.sh

19 lines
438 B
Bash
Executable File

#!/bin/bash
set -e
V=$(grep -i "project.*VERSION.*LANGUAGES" CMakeLists.txt | sed 's/.*VERSION \([0-9.]*\) .*/\1/')
D=$(mktemp -d "/tmp/myx-cmake.XXXXXX")
mkdir -p "$D/myx-cmake-$V"
cp -ap CMakeLists.txt MyxCMake "$D/myx-cmake-$V"
pushd "$D"
tar Jcf "myx-cmake_${V}.orig.tar.xz" "myx-cmake-$V"
popd
cp -ap debian "$D/myx-cmake-$V"
pushd "$D/myx-cmake-$V"
dch -D unstable -v "${V}-1" -m "New version."
debuild
popd
cp -f ${D}/myx*deb .