zsvo/install-script.sh
itexpert228 fbe74e8a87
Improve dependency resolver and fix critical bugs
- Add comprehensive Debian dependency resolver (400+ package mappings)

- Implement automatic recursive dependency resolution for build dependencies

- Fix logic errors in install.go: allowFailure handling, ensureBuildDependency

- Fix install-script.sh PKGDIR environment variable handling

- Fix hardcoded /tmp/install-script.sh path in autoRecipeFromDebian

- Fix wrong yyjson URL

- Increase build timeout from 30min to 2 hours

- Improve command validation security

- Fix temporary directory leaks in installer

- Update .gitignore to include zsvo-test binary
2026-03-14 19:54:49 +03:00

38 lines
1 KiB
Bash

#!/bin/bash
# Simple install script for auto-generated packages
set -e
# Use PKGDIR from environment, fallback to first argument for backward compatibility
PKGDIR="${PKGDIR:-$1}"
if [ -z "$PKGDIR" ]; then
echo "Error: PKGDIR not set. Usage: PKGDIR=/path/to/dest $0" >&2
exit 1
fi
echo "Installing to $PKGDIR"
# Try CMake
if [ -f build/cmake_install.cmake ]; then
echo "Using CMake install"
DESTDIR="$PKGDIR" cmake --install build
exit 0
fi
# Try Meson
if [ -f build/meson-private/coredata.dat ]; then
echo "Using Meson install"
DESTDIR="$PKGDIR" meson install -C build ${ZSVO_MESON_INSTALL_ARGS}
exit 0
fi
# Try Makefile
if [ -f Makefile ] || [ -f makefile ] || [ -f GNUmakefile ]; then
echo "Using Makefile install"
make DESTDIR="$PKGDIR" PREFIX=/usr install ${ZSVO_MAKE_INSTALL_FLAGS}
exit 0
fi
# Fallback - create minimal structure
echo "Warning: No standard build system found, installing common directories"
mkdir -p "$PKGDIR/usr/bin" "$PKGDIR/usr/lib" "$PKGDIR/usr/include"