#!/usr/bin/env bash
#
# Yamada Hayao
# Twitter: @Hayao0819
# Email  : hayao@fascode.net
#
# (c) 2019-2020 Fascode Network.
#
# default.conf
#
# The script first reads this file
# You can change the default settings here
#
# Some values described here will be overridden by the arguments.
# If you want to prohibit overwriting with arguments, use the config of each channel.
# Create the configuration file (config) for each channel based on this file.
#
# This configuration file follows the bash syntax.
# Do not write any code other than the variable definitions specified in this script.
#


#-- archiso --#
# Architecture to build
# AlterISO currently supports x86_64 or i686
# Please note that the channels and kernels that can be used differ depending on the architecture.
# Change the default behavior of "-a" and "--arch".
arch=$(uname -m)

# OS name used for startup screen, etc.
# This setting cannot be changed by an argument.
os_name="Alter Linux"

# OS name used for the name of the image file.
# This setting cannot be changed by an argument.
iso_name=alterlinux

# Image file label
# This setting cannot be changed by an argument.
iso_label="ALTER_$(date +%Y%m%d)"

# Image file creator information
iso_publisher='Fascode Network <https://fascode.net>'

# Image name (not file name)
# This setting cannot be changed by an argument.
iso_application="${os_name} Live/Rescue CD"

# Image file version
# If gitversion (--gitversion) is enabled, Git's revision will be added to the end of this value.
# This setting cannot be changed by an argument.
iso_version=$(date +%Y.%m.%d)

# Directory name used for installation
# This setting cannot be changed by an argument.
install_dir=alter

# Work directory to execute pacstrap etc
# Change the default behavior of "-w" and "--work".
work_dir=work

# Directory to output image file and checksum
# Change the default behavior of "-o" and "--out".
out_dir=out

# Key used for signature
# Change the default behavior of "-g" and "--gpgkey".
# This setting cannot be changed by an argument.
gpg_key=


#-- Plymouth --#
# Set to true to enable plymouth.
# See help for a list of available values.
# Change the default behavior of "-b" and "--boot-splash".
boot_splash=false

# Set the theme name of plymouth.
theme_name="alter-logo"

# Set the package name of the plymouth theme.
# Install only if plymouth is enabled.
# If it is not packaged, leave this item empty and place those files in airootfs.
# This setting cannot be changed by an argument.
theme_pkg="plymouth-theme-alter-logo-git"


#-- alteriso config --#

# Set the kernel that live session use.
# Please don't set anything if you want to use normal kernel.
# See help for a list of available values.
# Change the default behavior of "-k" and "--kernel".
kernel=zen

# Set the Japanese mode.
# When this is enabled, the packages in the japanese package list will be installed.
# And some files for Japanese are used.
# Change the default behavior of "-j" and "--japanese".
japanese=false

# Channel name to build by default
channel_name='xfce'

# See the `mksquashfs` help for details on these items.
# This variable overrides each build option "-c" or "-t".
sfs_comp="zstd"
sfs_comp_opt=""


#-- Live environment user --#

# Set the default live environment user name
# Channel developers should use this.
defaultusername='alter'

# Set the live environment user name
# Change the default behavior of "-u" and "--user".
# Overrides default settings
username="alter"

# Set the live environment user password
# Change the default behavior of "-p" or "--password".
password="alter"

# Set the user's default shell.
# This setting cannot be changed by an argument.
#
# The shell should be listed in /etc/shells, the package installed, 
# and the appropriate configuration files in /etc/skel.
usershell="/bin/bash"


#-- Script options --#

# Enable post-build cleaning.
# When enabled, airootfs in the working directory is deleted after squashfs is created.
# Change the default behavior of "-l" and "cleanup".
cleaning=false

# Set whether to check the build.
# If true, do not check. If false, confirm.
# Change the default behavior of "--noconfirm".
noconfirm=false

# Use mkalteriso written in a traditional shell script 
# instead of the C ++ version of mkalteriso.
# Change the default behavior of "--shmkalteriso".
shmkalteriso="false"

# When set to true, colored output will not be performed.
# Change the default behavior of "--nocolor".
nocolor=false

# If set to true, do not check dependent packages.
# Change the default behavior of "--nodepend".
# Dependent packages are defined in the following array.
nodepend=false

# Do not check the current kernel or load kernel modules.
# Change the default behavior of "--noloopmod".
noloopmod=false

# Do not include the channel name in the filename of the image file.
# This setting cannot be changed by an argument.
nochname=false

#-- Debug options --#

# Set debug mode.
# This setting can only be set to true or false.
# If bash_debug is set to true, it will be easier to see how the script is executed by executing set -xv.
# If debug is set to true, debug messages useful for channel development will be displayed.
bash_debug=false
debug=false

# If set to true, enable message debag.
# Change the default behavior of "--msgdebug".
msgdebug=false

# If set to true, enable git version
# Change the default behavior of "--gitversion".
# Git version is generated with the following code
# $ git rev-parse --short HEAD
gitversion=false


# List of packages required for build
# The following packages are checked to see if they are installed before running build.sh
# Also, wizard.sh will install it automatically.
#
# If you don't use Alter Linux repository, redefine this array in channel config
# and remove alterlinux related packages from dependence.
dependence=(
    "alterlinux-keyring"
#   "archiso"
    "arch-install-scripts"
    "curl"
    "dosfstools"
    "edk2-shell"
    "git"
    "libburn"
    "libisofs"
    "lz4"
    "lzo"
    "make"
    "ninja"
    "squashfs-tools"
    "libisoburn"
 #  "lynx"
    "xz"
    "zlib"
    "zstd"
)

