# Template file for 'WindowMaker'
pkgname=WindowMaker
version=0.96.0
revision=2
build_style=gnu-configure
configure_args="--enable-xinerama --localedir=/usr/share/locale
 --enable-usermenu --enable-modelock --enable-xrandr --enable-wmreplace
 --disable-static LINGUAS=*"
hostmakedepends="automake libtool gettext pkg-config"
makedepends="libXinerama-devel libXrandr-devel libXmu-devel libXpm-devel
 libXft-devel libpng-devel tiff-devel giflib-devel fontconfig-devel
 libexif-devel"
conf_files="
 /etc/WindowMaker/WindowMaker
 /etc/WindowMaker/WMRootMenu
 /etc/WindowMaker/WMWindowAttributes
 /etc/WindowMaker/WMState
 /etc/WindowMaker/WMGLOBAL"
short_desc="X11 window manager with a NEXTSTEP look and feel"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, WTFPL"
homepage="https://www.windowmaker.org/"
changelog="http://www.windowmaker.org/news/"
distfiles="https://github.com/window-maker/wmaker/releases/download/wmaker-${version}/WindowMaker-${version}.tar.gz"
checksum=4fe130ba23cf4aa21c156ec8f01f748df537d0604ec06c6bbcec896df1926f6d
# tests various things against documentation, doesn't make sense to run
make_check=no

pre_configure() {
	autoreconf -fi
}
post_configure() {
	# Remove hardcoded /usr/{include,lib} paths!
	find ${wrksrc} -name Makefile -exec sed 's,-L${libdir},,g;s,-I${includedir},,g' -i {} \;
}

post_install() {
	vlicense COPYING.WTFPL
}

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