# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libxfce4ui
pkgver=4.13.1
pkgrel=0
pkgdesc="Widgets library for the Xfce desktop environment"
url="https://xfce.org/"
arch="all"
license="GPL-2.0"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-gtk3"
depends=
depends_dev="startup-notification-dev"
makedepends="$depends_dev gtk+2.0-dev gtk+3.0-dev libxfce4util-dev xfconf-dev
	glade3-dev gtk-doc"
source="http://archive.xfce.org/src/xfce/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--enable-gladeui \
		--with-vendor-info="${DISTRO_NAME:-Alpine Linux}" \
		--disable-static \
		--enable-gtk-doc
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

dev() {
	default_dev
	mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/usr/share
	mv "$pkgdir"/usr/lib/glade3 "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/share/glade3 "$subpkgdir"/usr/share/
}

gtk3() {
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libxfce4ui-2.so.* \
		"$pkgdir"/usr/lib/libxfce4kbd-private-3.so.* \
		"$subpkgdir"/usr/lib/
}
sha512sums="056f6c944f1060f43037427304fccc7bb835a0ba5263d9c2f41c5cd2f980a61d4c45f9aa4b97004bae0b57e0020de0af43345b28f53748cea94fcd97fe785523  libxfce4ui-4.13.1.tar.bz2"
