# Template file for 'muffin'
pkgname=muffin
version=6.4.1
revision=2
build_style=meson
build_helper="gir"
# -Dtests requires -Dwayland, which is explicitly disabled
configure_args="-Dopengl=true -Degl=true -Dglx=true -Dgles2=true
 -Dudev=true -Dsm=true -Dlibwacom=true -Dpango_ft2=true
 -Dstartup_notification=true -Dremote_desktop=true -Dintrospection=true
 -Dprofiler=false -Ddebug=false -Ddefault_driver=auto"
hostmakedepends="gdk-pixbuf-devel gettext-devel-tools glib-devel
 intltool pkg-config wayland-devel wayland-protocols xorg-server-xwayland"
makedepends="cinnamon-desktop-devel libSM-devel libinput-devel fribidi-devel
 libglib-devel graphene-devel gtk+3-devel gdk-pixbuf-devel pango-devel
 cairo-devel upower-devel libXcomposite-devel libxkbcommon-devel
 libXfixes-devel libXi-devel libXrandr-devel libwacom-devel atk-devel
 libXcursor-devel libXdamage-devel libXext-devel libxkbfile-devel
 xkeyboard-config libXrender-devel libX11-devel libxcb-devel libXau-devel
 libXinerama-devel libICE-devel dbus-devel libglvnd-devel
 eudev-libudev-devel libgudev-devel wayland-devel libgbm-devel pipewire-devel
 libcanberra-devel startup-notification-devel libXtst-devel json-glib-devel
 elogind-devel mutter-devel"
depends="zenity"
short_desc="Cinnamon window manager based on Mutter"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.0-or-later"
homepage="https://github.com/linuxmint/muffin"
changelog="https://raw.githubusercontent.com/linuxmint/muffin/master/debian/changelog"
distfiles="https://github.com/linuxmint/muffin/archive/${version}.tar.gz"
checksum=3c4ef0139d9bbaf7ac17f39dd06b6397c175614a2eb6c55d463024a457293808

post_install() {
	vmkdir usr/share/gir-1.0
	mv ${DESTDIR}/usr/lib/muffin/*.gir ${DESTDIR}/usr/share/gir-1.0
	vmkdir usr/lib/girepository-1.0
	mv ${DESTDIR}/usr/lib/muffin/*.typelib ${DESTDIR}/usr/lib/girepository-1.0
}

muffin-devel_package() {
	depends="${makedepends} ${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/share/gir-1.0
		vmove "usr/lib/*.so"
	}
}
