# Meowven OS Calamares configuration. Calamares itself is built separately.
pkgname=meowven-installer
pkgver=0.1.0
pkgrel=3
pkgdesc='Meowven OS graphical installer configuration and branding'
arch=('any')
license=('GPL-3.0-or-later' 'LicenseRef-Meowbah-Artwork')
depends=('calamares>=3.4.3' 'calamares<3.5' 'kdialog' 'polkit' 'rsync'
         'squashfs-tools' 'grub' 'efibootmgr' 'dosfstools' 'e2fsprogs'
         'btrfs-progs' 'xfsprogs' 'ntfs-3g' 'cryptsetup' 'lvm2' 'sudo'
         'mkinitcpio' 'python' 'python-yaml' 'python-jsonschema')
optdepends=('openbox: window manager for the optional X11 installer session'
            'xorg-server: display server for the optional X11 installer session'
            'xorg-xauth: authentication for the optional X11 installer session')
options=('!strip' '!debug')

package() {
    install -d "$pkgdir/etc/calamares" "$pkgdir/usr/share/calamares/branding"
    cp -a "$startdir/files/calamares/." "$pkgdir/etc/calamares/"
    cp -a "$startdir/files/branding/meowven" "$pkgdir/usr/share/calamares/branding/"
    install -Dm755 "$startdir/files/meowven-install" "$pkgdir/usr/bin/meowven-install"
    install -Dm755 "$startdir/files/prepare-target" "$pkgdir/usr/lib/meowven-installer/prepare-target"
    install -Dm755 "$startdir/files/meowven-installer-session" "$pkgdir/usr/lib/meowven-installer/installer-session"
    install -Dm644 "$startdir/files/mkinitcpio-target.conf" "$pkgdir/usr/share/meowven-installer/mkinitcpio-target.conf"
    install -Dm644 "$startdir/files/meowven-install.desktop" "$pkgdir/usr/share/applications/meowven-install.desktop"
    install -Dm644 "$startdir/files/meowven-installer-x11.desktop" "$pkgdir/usr/share/xsessions/meowven-installer-x11.desktop"
    install -Dm644 "$startdir/files/49-meowven-installer.rules" "$pkgdir/usr/share/polkit-1/rules.d/49-meowven-installer.rules"
    install -Dm644 "$startdir/files/branding/meowven/logo.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/meowven-install.svg"
  install -Dm644 "$startdir/files/branding/meowven/CREDITS.md" "$pkgdir/usr/share/licenses/$pkgname/ARTWORK.md"
}
