#!/bin/bash

################################################
# Slackware ARM virtualization software stack
################################################
# Author:...Brenton Earl <el0226@slackware.com>
# Date:.....2023-11-06
# Modified..2025-06-27
# Summary:..Built with support for aarch64 only.
################################################
# TODO:  nothing for now
################################################
# ChangeLog:
#
# 2025-06-27
# - Updated to latest build scripts from SBo
#
# 2025-07-02
# - Moved sha256sums and downloads code to
#   tools/refresh.source
# - Default to single host builds, no more
#   dbuild.
################################################

REPOSITORY=${REPOSITORY:-/tmp/slackware-aarch64-virtualization}
NUMJOBS=${NUMJOBS:--j$(expr $(nproc) - 2 )}

#set -e
export REPOSITORY NUMJOBS

for SLACKBUILD in \
    spice-protocol \
    spice \
    spice-gtk \
    gtk-vnc \
    lloyd-yajl \
    libvirt \
    libvirt-python \
    libvirt-glib \
    osinfo-db-tools \
    osinfo-db \
    libosinfo \
    virt-manager \
    libmd \
    libbsd \
    netcat-openbsd \
    qemu ;
do
    cd $REPOSITORY/$SLACKBUILD || exit 1
    f=$(basename $(cat download.info ))

    ./arm/build || exit 1

    upgradepkg --terse --install-new /root/tgzstash/testing/$SLACKBUILD-*${TAG}.txz
done 

