# Template file for 'plymouth'
pkgname=plymouth
version=0.9.3
revision=3
build_style=gnu-configure
configure_args="--with-system-root-install=no \
 --without-rhgb-compat-link --enable-systemd-integration=no \
 --enable-gdm-transition $(vopt_enable gtk3 gtk) $(vopt_enable pango) \
 --with-logo=/usr/share/void-artwork/void-transparent.png --localstatedir=/ \
 --disable-documentation"
conf_files="/etc/plymouth/plymouthd.conf"
hostmakedepends="pkg-config"
makedepends="libdrm-devel libpng-devel void-artwork
 $(vopt_if gtk3 gtk+3-devel) $(vopt_if pango pango-devel)"
depends="plymouth-data>=0"
short_desc="Graphical boot animation and logger"
maintainer="William OD <obirik2005@gmail.com>"
homepage="https://www.freedesktop.org/wiki/Software/Plymouth/"
license="GPL-2"
distfiles="${FREEDESKTOP_SITE}/plymouth/releases/$pkgname-$version.tar.xz"
checksum=9f8dd08a90ceaf6228dcd8c27759adf18fc9482f15b6c56dcbcced268b4e4a74

build_options="gtk3 pango"
build_options_default="gtk3 pango"
desc_option_pango="Enable building with Pango (for password/question prompts)"

case "$XBPS_TARGET_MACHINE" in
	*-musl) makedepends+=" musl-rpmatch-devel"
		LDFLAGS="-lrpmatch"
		;;
esac

post_install() {
	vinstall ${FILESDIR}/71-plymouth-seat.rules 644 usr/lib/udev/rules.d/
}

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

plymouth-data_package() {
	short_desc+=" - data files"
	noarch=yes
	depends="void-artwork"
	pkg_install() {
		vmove usr/share/plymouth/themes
	}
}
