From 645150039ad0e6216b5d10ffc1150fe7292d4544 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 25 Aug 2026 13:34:52 +0300 Subject: [PATCH] BuildSystem: Add script to package all ports --- ports/package-all-ports.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 ports/package-all-ports.sh diff --git a/ports/package-all-ports.sh b/ports/package-all-ports.sh new file mode 100644 index 00000000..e2be36ca --- /dev/null +++ b/ports/package-all-ports.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +if [[ -z $BANAN_ROOT_DIR ]]; then + export BANAN_ROOT_DIR="$(realpath $(dirname $(realpath "$0"))/..)" +fi + +source "$BANAN_ROOT_DIR/script/config.sh" + +package_standalone() { + pushd "$BANAN_PORT_DIR/$1" >/dev/null + + local version_string="$(../get-version-string.sh)" + if [ ! -f "$BANAN_PORT_DIR/package/repo/${version_string}.xbps" ]; then + local dependency + for dependency in $(source build.sh; echo ${DEPENDENCIES[*]}); do + package_standalone "$dependency" + done + + find "$BANAN_SYSROOT/usr/lib" \( -type f -o -type l \) -delete + PACKAGE=1 ./build.sh || echo "$port_name" >> ../failed-shit + fi + + popd >/dev/null +} + +cd "$BANAN_PORT_DIR" +for build_script in */build.sh; do + port_name="${build_script%/*}" + + [[ "$port_name" == 'llvm' ]] && continue + + package_standalone "$port_name" +done