diff options
author | sixsixfive | 2015-12-15 03:51:01 +0100 |
---|---|---|
committer | sixsixfive | 2015-12-15 03:51:01 +0100 |
commit | 98fa95aa3992c73ecf9f9c3cd4eeb4b406bae15e (patch) | |
tree | 4b940ec046627adc3c883f103fd74a15876cbb9d | |
download | aur-98fa95aa3992c73ecf9f9c3cd4eeb4b406bae15e.tar.gz |
first
-rw-r--r-- | .SRCINFO | 45 | ||||
-rw-r--r-- | PKGBUILD | 85 | ||||
-rw-r--r-- | openrc.install | 27 | ||||
-rw-r--r-- | systemd.install | 27 |
4 files changed, 184 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cbb307be9a2b --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,45 @@ +# Generated by mksrcinfo v8 +# Tue Dec 15 02:50:50 UTC 2015 +pkgbase = thinkfan-git + pkgdesc = Thinkfan is a simple, lightweight fan control program. Originally designed specifically for IBM/Lenovo Thinkpads, it now supports any kind of system via the sysfs hwmon interface (/sys/class/hwmon). It is designed to eat as little CPU power as possible. + pkgver = 1.0.r143 + pkgrel = 1 + url = http://thinkfan.sourceforge.net + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = git + makedepends = cmake + makedepends = make + makedepends = sed + depends = libatasmart + depends = lm_sensors + optdepends = libatasmart: read HDD temperatures + optdepends = lm_sensors: hwmon support + source = thinkfan-git::git://github.com/vmatare/thinkfan#branch=master + md5sums = SKIP + +pkgname = thinkfan-openrc + install = openrc.install + depends = libatasmart + depends = lm_sensors + depends = openrc + provides = thinkfan-openrc=1.0.r143 + provides = thinkfan-openrc-git=1.0.r143 + conflicts = thinkfan-openrc<=1.0.r143 + conflicts = thinkfan-openrc-git<=1.0.r143 + replaces = thinkfan-openrc<=1.0.r143 + replaces = thinkfan-openrc-git<=1.0.r143 + +pkgname = thinkfan-systemd + install = systemd.install + depends = libatasmart + depends = lm_sensors + depends = systemd + provides = thinkfan-systemd=1.0.r143 + provides = thinkfan-systemd-git=1.0.r143 + conflicts = thinkfan-systemd<=1.0.r143 + conflicts = thinkfan-systemd-git<=1.0.r143 + replaces = thinkfan-systemd<=1.0.r143 + replaces = thinkfan-systemd-git<=1.0.r143 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..b5b537f3b9fd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,85 @@ +# Maintainer: SSF <punx69 at gmx dot net> + +pkgbase=thinkfan-git +pkgname=('thinkfan-openrc' 'thinkfan-systemd') +pkgver=1.0.r143 +pkgrel=1 +pkgdesc="Thinkfan is a simple, lightweight fan control program. Originally designed +specifically for IBM/Lenovo Thinkpads, it now supports any kind of system via +the sysfs hwmon interface (/sys/class/hwmon). It is designed to eat as little +CPU power as possible." +arch=('i686' 'x86_64') +url="http://thinkfan.sourceforge.net" +license=('GPL3') +makedepends=('git' 'cmake' 'make' 'sed') +optdepends=('libatasmart: read HDD temperatures' 'lm_sensors: hwmon support') +#source=("$pkgname::git://git.code.sf.net/p/thinkfan/code#branch=master") +##using new fork! +source=("$pkgbase::git://github.com/vmatare/thinkfan#branch=master") +md5sums=('SKIP') + +###if installed add to deps +if (pacman -Q libatasmart >/dev/null); then + depends+=('libatasmart') +fi +if (pacman -Q lm_sensors >/dev/null); then + depends+=('lm_sensors') +fi + +pkgver() { + cd ${pkgbase} + _rev=$(git rev-list --count HEAD) + printf "1.0.r$_rev" +} + +build() { + cd ${pkgbase} + if (pacman -Q libatasmart >/dev/null); then + msg "building against libatasmart" + cmake -DUSE_ATASMART:BOOL=ON -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DUSE_NVML=OFF -DCMAKE_INSTALL_SBINDIR=/usr/bin . + else + msg "building without libatasmart" + cmake -DUSE_ATASMART:BOOL=OFF -DCMAKE_INSTALL_PREFIX:PATH=/usr \ + -DUSE_NVML=OFF -DCMAKE_INSTALL_SBINDIR=/usr/bin . + fi + make +} + +package_thinkfan-openrc() { + provides=("${pkgname}=$pkgver" "${pkgname}-git=$pkgver") + conflicts=("${pkgname}<=$pkgver" "${pkgname}-git<=$pkgver") + replaces=("${pkgname}<=$pkgver" "${pkgname}-git<=$pkgver") + depends+=('openrc') + install="openrc.install" + cd ${pkgbase} + make install DESTDIR=${pkgdir} + install -d ${pkgdir}/etc +###let this thing run at full speed(7) unitl configured + printf "#full speed see /usr/share/doc/thinkfan for proper configuration\n(7,0,32767)\n" > ${pkgdir}/etc/thinkfan.conf +###not really needed + sed -i 's|#!/sbin/runscript|#!/usr/bin/openrc-run|' rcscripts/thinkfan.gentoo + install -Dm755 rcscripts/thinkfan.gentoo ${pkgdir}/etc/init.d/thinkfan + install -Dm644 COPYING ${pkgdir}/usr/share/licenses/thinkfan/COPYING +###thinkpad modules load + install -d ${pkgdir}/etc/modprobe.d + printf "options thinkpad_acpi fan_control=1" > ${pkgdir}/etc/modprobe.d/thinkfan-thinkpad.conf +} + +package_thinkfan-systemd() { + provides=("${pkgname}=$pkgver" "${pkgname}-git=$pkgver") + conflicts=("${pkgname}<=$pkgver" "${pkgname}-git<=$pkgver") + replaces=("${pkgname}<=$pkgver" "${pkgname}-git<=$pkgver") + depends+=('systemd') + install="systemd.install" + cd ${pkgbase} + make install DESTDIR=${pkgdir} + install -d ${pkgdir}/etc +###let this thing run at full speed(7) unitl configured + printf "#full speed see /usr/share/doc/thinkfan for proper configuration\n(7,0,32767)\n" > ${pkgdir}/etc/thinkfan.conf + install -Dm644 rcscripts/thinkfan.service ${pkgdir}/usr/lib/systemd/system/thinkfan.service +###thinkpad modules load + install -d ${pkgdir}/etc/modprobe.d + printf "options thinkpad_acpi fan_control=1" > ${pkgdir}/etc/modprobe.d/thinkfan-thinkpad.conf +} + diff --git a/openrc.install b/openrc.install new file mode 100644 index 000000000000..b26385e41a72 --- /dev/null +++ b/openrc.install @@ -0,0 +1,27 @@ +post_install() { + rc-update add thinkfan default + cat <<\EOF + +Until you configure Thinkfan(/etc/thinkfan.conf) it will always run at +full speed! + +For proper configuration see the README and example configurations in /usr/share/doc/thinkfan + +Thinkfan will also start automatically after the next reboot! + +EOF +sleep 5 +} + +pre_remove() { + rc-service thinkfan stop + rc-update del thinkfan default +} + +pre_upgrade() { + rc-service thinkfan stop +} + +post_upgrade() { + rc-service thinkfan restart +} diff --git a/systemd.install b/systemd.install new file mode 100644 index 000000000000..9e07d9c0d5ce --- /dev/null +++ b/systemd.install @@ -0,0 +1,27 @@ +post_install() { + systemctl enable thinkfan.service + cat <<\EOF + +Until you configure Thinkfan(/etc/thinkfan.conf) it will always run at +full speed! + +For proper configuration see the README and example configurations in /usr/share/doc/thinkfan + +Thinkfan will also start automatically after the next reboot! + +EOF +sleep 5 +} + +pre_remove() { + systemctl stop thinkfan.service + systemctl disable thinkfan.service +} + +pre_upgrade() { + systemctl stop thinkfan.service +} + +post_upgrade() { + systemctl restart thinkfan.service +} |