# Template file for 'dhcpcd-gtk'
pkgname=dhcpcd-gtk
version=0.7.8
revision=1
wrksrc=dhcpcd-ui-${version}
build_style=gnu-configure
configure_args="--with-gtk --with-icons --with-notification"
hostmakedepends="pkg-config"
makedepends="gtk+-devel libnotify-devel dbus-devel"
depends="dhcpcd dhcpcd-icons desktop-file-utils"
short_desc="GTK+ monitor and configuration GUI for dhcpcd"
maintainer="Orphaned <orphan@voidlinux.org>"
license="BSD-2-Clause"
homepage="http://roy.marples.name/projects/dhcpcd-ui"
distfiles="http://roy.marples.name/downloads/dhcpcd/dhcpcd-ui-$version.tar.xz"
checksum=4170a07b8bbba65b30f8da8a15a4d776cbf17d030b666516821d450f594a9d6c

if [ "${XBPS_TARGET_LIBC}" = musl ]; then
	makedepends+=" musl-legacy-compat"
fi

pre_install() {
	head -n 25 src/dhcpcd-gtk/dhcpcd-gtk.h > LICENSE
}

post_install() {
	vlicense LICENSE
}

dhcpcd-icons_package() {
	short_desc+=" - icon set"
	depends="hicolor-icon-theme"
	replaces="dhcpcd-gtk<0.7.4"
	pkg_install() {
		vmove usr/share/icons
		vmove usr/share/dhcpcd/icons
	}
}
