AkurAI Build
Menu

BifrOSt

public

Latest change 6367eb60d4c5b47418e9d63ab1b394ef7daf7265 - Migrate first-party URLs to AkurAI Build by Ólafur Búi Ólafsson

# Maintainer: BifrOSt release engineering
pkgname=bifrost-system
pkgver="$(<../../VERSION)"
pkgrel=1
pkgdesc="BifrOSt system integration and first-party maintenance payload"
arch=('any')
url='https://akurai-build.olibuijr.com/repos/BifrOSt'
license=('MIT')
depends=('flatpak' 'fwupd' 'gtk4' 'libadwaita' 'pacman' 'pacman-contrib' 'polkit' 'python' 'python-gobject')
backup=('etc/pacman.conf.d/bifrost.conf')
install=bifrost-system.install
options=('!strip' '!debug')

package() {
    local source_root=${BIFROST_SOURCE_ROOT:?BIFROST_SOURCE_ROOT must name the repository root}
    local public_key=${BIFROST_ALPM_PUBLIC_KEY:?BIFROST_ALPM_PUBLIC_KEY must name the pinned public key}
    local fingerprint=${BIFROST_ALPM_FINGERPRINT:?BIFROST_ALPM_FINGERPRINT must be the full signing fingerprint}
    local installed_root="$source_root/profile/airootfs/usr/share/bifrost/installed-root"

    [[ -d $installed_root/usr ]] || return 1
    cp -a "$installed_root/." "$pkgdir/"

    # Static installed-system identity and branding are package-owned rather
    # than copied behind pacman's back by the installer.
    install -Dm644 \
        "$source_root/profile/airootfs/usr/share/bifrost/os-release" \
        "$pkgdir/usr/share/bifrost/os-release"
    install -Dm644 \
        "$source_root/profile/airootfs/usr/share/backgrounds/bifrost/bifrost-aurora.png" \
        "$pkgdir/usr/share/backgrounds/bifrost/bifrost-aurora.png"
    install -Dm644 \
        "$source_root/profile/airootfs/usr/share/bifrost/branding/bifrost-mark.svg" \
        "$pkgdir/usr/share/bifrost/branding/bifrost-mark.svg"
    install -Dm644 \
        "$source_root/profile/airootfs/usr/share/icons/hicolor/scalable/apps/bifrost.svg" \
        "$pkgdir/usr/share/icons/hicolor/scalable/apps/bifrost.svg"
    install -Dm644 \
        "$source_root/profile/airootfs/usr/share/bifrost/cosmic-background.ron" \
        "$pkgdir/usr/share/bifrost/branding/cosmic-background.ron"
    install -Dm644 \
        "$source_root/profile/airootfs/etc/plymouth/plymouthd.conf" \
        "$pkgdir/usr/share/bifrost/branding/plymouthd.conf"
    install -d -m 0755 "$pkgdir/usr/share/plymouth/themes"
    cp -a "$source_root/profile/airootfs/usr/share/plymouth/themes/bifrost" \
        "$pkgdir/usr/share/plymouth/themes/"
    install -Dm644 \
        "$source_root/profile/airootfs/etc/systemd/system/plymouth-quit.service.d/bifrost.conf" \
        "$pkgdir/etc/systemd/system/plymouth-quit.service.d/bifrost.conf"

    # Generated interpreter caches are never release inputs or package payload.
    find "$pkgdir" -type d -name __pycache__ -prune -exec rm -rf -- {} +
    find "$pkgdir" -type f \( -name '*.pyc' -o -name '*.pyo' \) -delete
    chmod 0755 "$pkgdir"/usr/bin/bifrost-* "$pkgdir/usr/lib/bifrost-maintenance/system-upgrade"
    chmod 0644 \
        "$pkgdir/usr/lib/bifrost-apps/manager.py" \
        "$pkgdir/usr/lib/bifrost-maintenance/manager.py"
    install -Dm644 "$source_root/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"

    install -Dm644 "$public_key" "$pkgdir/usr/share/bifrost/keys/alpm-repository-key.asc"
    install -Dm644 /dev/stdin "$pkgdir/usr/share/bifrost/keys/alpm-repository-key.fingerprint" <<<"$fingerprint"
}