# Maintainer: Christian Rebischke <chris.rebischke@archlinux.org>
# Maintainer: Lucas Werkmeister <mail@lucaswerkmeister.de>
# Contributor: Dave Reisner <dreisner@archlinux.org>

pkgname=mkosi
pkgver=10
pkgrel=1
pkgdesc='Build Legacy-Free OS Images'
arch=('any')
url='https://github.com/systemd/mkosi'
license=('LGPL2.1')
depends=('python')
makedepends=('python-setuptools')
optdepends=('debootstrap: build Debian or Ubuntu images'
            'debian-archive-keyring: build Debian images'
            'ubuntu-keyring: build Ubuntu images'
            'arch-install-scripts: build Arch images'
            'gnupg: sign images'
            'xz: compress images with xz'
            'btrfs-progs: raw_btrfs and subvolume output formats'
            'dosfstools: build bootable images'
            'squashfs-tools: raw_squashfs output format'
            'tar: tar output format'
            'cryptsetup: add dm-verity partitions'
            'edk2-ovmf: run bootable images in QEMU'
            'qemu: run bootable images in QEMU'
            'sbsigntools: sign EFI binaries for UEFI SecureBoot')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/systemd/mkosi/archive/v$pkgver.tar.gz")
sha512sums=('0c90ea784678f39c50868fcbbc76e3e5a2a77da98afcbcca3da0115346df10c00f402dc2db0f02d6b3933960cff971d22c11d830b0f2e63b799942301d507379')

package() {
  cd "mkosi-$pkgver"
  export PYTHONHASHSEED=0
  python setup.py install --root="$pkgdir"
}
