# Template file for 'tlp'
pkgname=tlp
version=0.7
revision=2
wrksrc="TLP-${version}"
depends="hdparm bash iw rfkill ethtool"
conf_files="/etc/default/tlp"
conflicts="laptop-mode>=0"
noarch="yes"
short_desc="Advanced power management tool for Linux"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html"
distfiles="https://github.com/linrunner/TLP/archive/${version}.tar.gz"
checksum=bd313f478f897a658f2ca7db9665b8ce6796431b952f7df9aa80e59072cea4ea

do_install() {
	make DESTDIR=${DESTDIR} TLP_SBIN=/usr/bin TLP_ULIB=/usr/lib/udev install-tlp

	vmkdir usr/share/man/man1
	install -m644 man/*.1 ${DESTDIR}/usr/share/man/man1
	vmkdir usr/share/man/man8
	install -m644 man/*.8 ${DESTDIR}/usr/share/man/man8
	vsv tlp

	vmkdir usr/share/bash-completion/completions
	mv ${DESTDIR}/etc/bash_completion.d/tlp ${DESTDIR}/usr/share/bash-completion/completions

	rm -rf ${DESTDIR}/etc/init.d
}
