myx-cmake/build_deb.sh
2022-04-08 15:01:01 +03:00

22 lines
432 B
Bash
Executable File

#!/bin/bash
set -e
V=$(grep -i "project.*VERSION.*LANGUAGES" CMakeLists.txt | sed 's/.*VERSION \([0-9.]*\) .*/\1/')
D=build
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."
dpkg-buildpackage -us -uc
popd
rm -rf "$D/myx-cmake-$V"