# Template file for 'slim'
pkgname=slim
version=1.3.6
revision=2
build_style=cmake
configure_args="-DUSE_PAM=yes -DUSE_CONSOLEKIT=no"
hostmakedepends="cmake pkg-config"
makedepends="libpng-devel>=1.6 libjpeg-turbo-devel libXrandr-devel libXmu-devel libXft-devel pam-devel"
conf_files="/etc/slim.conf /etc/pam.d/slim"
systemd_services="slim.service off"
short_desc="Desktop-independent graphical login manager for X11"
maintainer="Juan RP <xtraeme@gmail.com>"
license="GPL-2"
homepage="http://slim.berlios.de/"
distfiles="http://download.berlios.de/slim/slim-${version}.tar.gz"
checksum=21defeed175418c46d71af71fd493cd0cbffd693f9d43c2151529125859810df

pre_configure() {
	sed -i 's|set(LIBDIR "/lib")|set(LIBDIR "/usr/lib")|' CMakeLists.txt
}

post_install() {
	vinstall ${FILESDIR}/slim.pam 644 etc/pam.d slim
	sed -e 's|#xserver_arguments.*|xserver_arguments -nolisten tcp vt01|' \
		-e 's|/var/run/slim.lock|/var/lock/slim.lock|' -i ${DESTDIR}/etc/slim.conf
}