# Maintainer: nippy <nippy@tuta.io>

pkgname=artcraft-launcher
pkgver=0.16.1
pkgrel=1
pkgdesc='Install, update and launch the ArtCraft Craft App Suite'
arch=(x86_64)
url="https://getartcraft.com/apps"
_url="https://github.com/storytold/craft-launcher"
license=(MIT Apache-2.0)
depends=(glibc
         gcc-libs
         hicolor-icon-theme
         libxkbcommon
         libxkbcommon-x11
         vulkan-icd-loader
         flatpak)
optdepends=('wayland: native Wayland display support'
            'libx11: X11 and XWayland display support'
            'libxcursor: X11 cursor handling'
            'libxi: X11 input handling'
            'libxrandr: X11 display resolution handling'
            'xdg-desktop-portal: native desktop integration and file dialogs')
conflicts=(ai.storyteller.artcraft-launcher)
replaces=(designcraft effectcraft filmcraft lightcraft pdfcraft photocraft vectorcraft)
options=(!strip !debug)
_archive="$pkgname-$pkgver-linux-x86_64"
source=("$_url/releases/download/v$pkgver/$_archive.tar.gz")
sha256sums=('540536bd4bc520e20511f3e5445e2b2dc1ef79f70f37ebe1894b919e3219f825')

package() {
	cd "$_archive"
	install -Dm755 bin/artcraft-launcher "$pkgdir/usr/bin/artcraft-launcher"
	install -d "$pkgdir/usr/share"
	cp -dr --no-preserve=ownership share/. "$pkgdir/usr/share/"
	install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" \
		share/doc/artcraft-launcher/LICENSE-MIT \
		share/doc/artcraft-launcher/LICENSE-APACHE \
		share/doc/artcraft-launcher/NOTICE
}
