# Maintainer: Kimiblock Moe

pkgname=fractal-portable
pkgver=14.1
pkgrel=1
epoch=1
pkgdesc="Fractal sandboxed by portable. No dGPU wakeups."
arch=('x86_64')
url="https://github.com/Kraftland/portable"
license=('GPL-3.0-or-later')
groups=()
provides=(fractal)
options=(!debug !strip)
conflicts=("fractal")

optdepends=()

makedepends+=(fractal portable-packer)

checkdepends=()

source=(
	config.toml
	fractal.sh
	fractal.desktop
)


md5sums=('38f4781a6d363bebe53bca8305e96699'
         'f7fdec85a4e799a84b6c23fb86292aca'
         '34df188be220acae0f451eedc5992881')

function package() {
	depends=("portable")
	depends+=(dconf  fontconfig  gcc-libs  gdk-pixbuf2  glib2  glibc  	glycin-gtk4  graphene  gst-plugins-bad-libs  gst-plugins-base-libs  gst-plugin-gtk4  gstreamer
                  gtk4  gtksourceview5  hicolor-icon-theme  lcms2  libadwaita  libpipewire  libseccomp  libshumate  openssl  org.freedesktop.secrets  pango  sqlite)
	install -vDm755 "/usr/bin/fractal" -t "${pkgdir}/usr/lib/portable/overlay-usr"
	export pkgdir
	export pkgname
	export srcdir
	portable-packer \
		-v \
		--distro arch \
		--mode copy fractal \
		--hash true \
		--config-ng "${srcdir}/config.toml" \
		--desktop-file "${srcdir}/fractal.desktop" \
		--dbus-activation
}
