From c0ed8ed6e0634b3f882fa0de4f2befd1138f89e3 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Fri, 8 Nov 2024 09:41:13 +0100 Subject: [PATCH] [packaging,scripts] add create_deb.sh --- packaging/scripts/create_deb.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 packaging/scripts/create_deb.sh diff --git a/packaging/scripts/create_deb.sh b/packaging/scripts/create_deb.sh new file mode 100755 index 000000000..0e8697031 --- /dev/null +++ b/packaging/scripts/create_deb.sh @@ -0,0 +1,24 @@ +#!/bin/bash -xe + +SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]}") +SCRIPT_PATH=$(realpath "$SCRIPT_PATH") + +BUILD_DEPS=$(/usr/bin/which dpkg-checkbuilddeps) +BUILD_PKG=$(/usr/bin/which dpkg-buildpackage) + +if [ -z "$BUILD_DEPS" || -z "$BUILD_PKG" ]; +then + echo "dpkg-buildpackage [$BUILD_PKG] and dpkg-checkbuilddeps [$BUILD_DEPS] required" + echo "Install with 'sudo apt install dpkg-dev'" + exit 1 +fi + +# First create a link to the debian/control folder +cd "$SCRIPT_PATH/../.." +ln -sf "packaging/deb/freerdp-nightly" "debian" + +# Check all dependencies are installed +$BUILD_DEPS "debian/control" + +# And finally build the package +$BUILD_PKG