# Template file for 'garcon'
pkgname=garcon
version=4.20.0
revision=1
build_style=gnu-configure
build_helper=gir
configure_args="--disable-static --enable-introspection"
hostmakedepends="pkg-config gettext glib-devel"
makedepends="libglib-devel libxfce4ui-devel libxfce4util-devel gtk+3-devel"
conf_files="/etc/xdg/menus/xfce-applications.menu"
short_desc="Glib/GIO freedesktop.org compliant menu implementation"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="LGPL-2.0-or-later"
homepage="https://xfce.org/"
changelog="https://gitlab.xfce.org/xfce/garcon/-/raw/master/NEWS"
distfiles="https://archive.xfce.org/src/xfce/garcon/${version%.*}/${pkgname}-${version}.tar.bz2"
checksum=7fb8517c12309ca4ddf8b42c34bc0c315e38ea077b5442bfcc4509415feada8f

pre_configure() {
	mkdir -p garcon-gtk/.libs
	ln -s ../../garcon/.libs/libgarcon-1.so.0 garcon-gtk/.libs/
	LDFLAGS+=" -Wl,--rpath-link=$wrksrc/garcon/.libs"
	LDFLAGS+=" -Wl,--rpath-link=$wrksrc/garcon-gtk/.libs"
}

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