# arctic-base - the files that make a system an Arctic system.
name=arctic-base
version=1.0.0
release=1
desc="Arctic Linux base configuration, init scripts and branding"
url="https://github.com/apiwo/arctic-linux"
license="BSD-2-Clause"
depend="busybox toybox zsh doas alpm"
source="skel.tar branding.tar"
sha256="SKIP SKIP"
backup="etc/inittab etc/profile etc/zsh/zshrc etc/doas.conf etc/alpm/alpm.conf"

package() {
	# The whole /etc and /usr skeleton: inittab, rc.boot, rc.d, zsh config.
	tar -xf skel.tar -C "$pkgdir"
	# Branding: icon theme, wallpapers, boot splash, ascii art.
	install -d "$pkgdir/usr/share/arctic"
	tar -xf branding.tar -C "$pkgdir/usr/share/arctic"
	mkdir -p "$(dirname $pkgdir/usr/bin/arctic-release)"
cat >"$pkgdir/usr/bin/arctic-release" <<-'SH'
		#!/bin/sh
		cat /etc/arctic-release
SH
chmod 755 "$pkgdir/usr/bin/arctic-release"
	# The greeting shown once, when a fresh install first boots.
	install -d "$pkgdir/var/lib/arctic"
}
