#!/bin/bash

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

## by default build all packages

pkg_list_create() {
   ## Important that derivative_name_item is a local variable.
   local derivative_name_item
   for derivative_name_item in $derivative_name_list ; do
      if [ "$pkg_list" = "" ] || [ "$pkg_automatic_list" = "true" ]; then
         pkg_automatic_list=true
         pkg_list="$pkg_list $(ls "$source_code_folder_dist/packages/$derivative_name_item/")"
      fi
   done
}

pkg_list_create

## to build only specific packages and overwrite the default list uncomment the following line and add them to the list
#pkg_list=""

## example list for minimal rpi gateway
#pkg_list="apparmor-profile-anondist gpl-sources-download tor-ctrl uwt usability-misc sdwdate timesanitycheck timezone-utc security-misc anon-gw-base-files ipv4-forward-disable ipv6-disable whonixsetup onion-grater open-link-confirmation whonix-base-files anon-apt-sources-list whonix-firewall initializer-dist whonix-repository anon-connection-wizard whonix-gw-network-conf dist-base-files anon-gw-anonymizer-config rpi-patches anon-meta-packages scurl helper-scripts damngpl bindp tor-control-panel"
