abinfo "Creating directory for installing repository configuration template ..."
mkdir -pv "$PKGDIR"/usr/share/repository-data

if ab_match_arch loongarch64_nosimd; then
    abinfo "Generating repository template for AOSC OS (LoongArch64, No SIMD) ..."
    cat > "$PKGDIR"/usr/share/repository-data/template.toml << EOF
[[config]]
components = ["bsp-loongarch64-nosimd"]
signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"]
architectures = ["loongarch64"]

[[config]]
components = ["main"]
signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"]
architectures = ["all"]
EOF
else
    abinfo "Generating repository template for AOSC OS (mainline) ..."
    cat > "$PKGDIR"/usr/share/repository-data/template.toml << EOF
[[config]]
components = ["main"]
signed-by = ["/usr/share/keyrings/aosc-archive-keyring.gpg"]
EOF
fi
