Add Debian build dependency checking to build.sh

- Added dependency verification for Debian package building
- Checks for required packages: debhelper, gcc, make, pkg-config, libssl-dev
- Provides clear error messages with installation commands
- Prevents failed builds due to missing dependencies
- Only runs checks when --debian flag is used
parent aa4be3b1
...@@ -96,7 +96,26 @@ fi ...@@ -96,7 +96,26 @@ fi
# Build Debian package if requested # Build Debian package if requested
if [ "$BUILD_DEBIAN" = true ]; then if [ "$BUILD_DEBIAN" = true ]; then
echo "Checking Debian build dependencies..."
# Check for required Debian build tools
missing_deps=""
for dep in debhelper gcc make pkg-config libssl-dev; do
if ! dpkg -l | grep -q "^ii $dep"; then
missing_deps="$missing_deps $dep"
fi
done
if [ -n "$missing_deps" ]; then
echo "Error: Missing Debian build dependencies:$missing_deps"
echo "Please install them with: sudo apt-get install$missing_deps"
echo "Or run: sudo apt-get install debhelper gcc make pkg-config libssl-dev"
exit 1
fi
echo "All Debian build dependencies found."
echo "Building Debian package..." echo "Building Debian package..."
if [ -d "wssshtools" ] && [ -d "wssshtools/debian" ]; then if [ -d "wssshtools" ] && [ -d "wssshtools/debian" ]; then
cd wssshtools cd wssshtools
dpkg-buildpackage -us -uc dpkg-buildpackage -us -uc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment