void-packages/srcpkgs/tlp/template

51 lines
1.6 KiB
Bash

# Template file for 'tlp'
pkgname=tlp
version=1.6.1
revision=1
depends="hdparm bash iw util-linux ethtool perl"
short_desc="Advanced power management tool for Linux"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://linrunner.de/en/tlp/docs/tlp-linux-advanced-power-management.html"
changelog="https://raw.githubusercontent.com/linrunner/TLP/main/changelog"
distfiles="https://github.com/linrunner/TLP/archive/${version}.tar.gz"
checksum=f7d013691a92ffcf42ef1648565dbc24a33202046d3c8138dad1963a3169a0f5
conflicts="laptop-mode>=0 perl-Unicode-Tussle>=0"
conf_files="/etc/tlp.conf /etc/tlp.d/*.conf"
make_dirs="/var/lib/tlp 0755 root root"
do_install() {
make DESTDIR=${DESTDIR} \
TLP_SBIN=/usr/bin \
TLP_ULIB=/usr/lib/udev \
TLP_ELOD=/usr/libexec/elogind/system-sleep \
TLP_WITH_SYSTEMD=0 \
install
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
install -m644 man-rdw/*.8 ${DESTDIR}/usr/share/man/man8
rm -f ${DESTDIR}/usr/share/man/man8/*.service.8
vsv tlp
vinstall ${FILESDIR}/tlp.resume 755 etc/zzz.d/resume 50-tlp.sh
vinstall ${FILESDIR}/tlp.suspend 755 etc/zzz.d/suspend 50-tlp.sh
rm -rf ${DESTDIR}/etc/init.d
}
tlp-rdw_package() {
short_desc="Control the radio device wizard"
depends="tlp NetworkManager"
pkg_install() {
vmove usr/bin/tlp-rdw
vmove usr/lib/udev/rules.d/85-tlp-rdw.rules
vmove usr/lib/udev/tlp-rdw-udev
vmove usr/lib/NetworkManager/dispatcher.d/99tlp-rdw-nm
vmove usr/share/man/man8/tlp-rdw.8
}
}