mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
community/linux-tools to 3.5-2
This commit is contained in:
parent
12c4ce7493
commit
b79f742ee4
4 changed files with 49 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
# $Id: PKGBUILD 74127 2012-07-22 02:44:47Z seblu $
|
||||
# $Id: PKGBUILD 74810 2012-08-06 02:37:26Z seblu $
|
||||
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
|
@ -7,7 +7,7 @@
|
|||
pkgbase=linux-tools
|
||||
pkgname=('perf' 'cpupower')
|
||||
pkgver=3.5
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
license=('GPL2')
|
||||
arch=('i686' 'x86_64')
|
||||
url='http://www.kernel.org'
|
||||
|
@ -19,11 +19,13 @@ source=("http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$pkgver.tar.xz"
|
|||
# "http://ftp.kernel.org/pub/linux/kernel/v3.x/patch-$pkgver.4.xz"
|
||||
'cpupower.rc'
|
||||
'cpupower.conf'
|
||||
'cpupower.systemd'
|
||||
'cpupower.service')
|
||||
md5sums=('24153eaaa81dedc9481ada8cd9c3b83d'
|
||||
'73dbc931e86b3b73d6e2338dcbee81a4'
|
||||
'1d9214637968b91706b6e616a100d44b'
|
||||
'857ccdd0598511e3bf4b63522754dc48'
|
||||
'20870541e88109d2f153be3c58a277f1')
|
||||
'c0d17b5295fe964623c772a2dd981771'
|
||||
'2450e8ff41b30eb58d43b5fffbfde1f4')
|
||||
|
||||
build() {
|
||||
# apply stable patching set
|
||||
|
@ -81,7 +83,9 @@ package_cpupower() {
|
|||
install install-man
|
||||
popd
|
||||
# install rc.d script
|
||||
install -D -m 755 cpupower.rc "$pkgdir/etc/rc.d/cpupower"
|
||||
install -D -m 644 cpupower.conf "$pkgdir/etc/conf.d/cpupower"
|
||||
install -D -m 644 cpupower.service "$pkgdir/usr/lib/systemd/system/cpupower.service"
|
||||
install -Dm 755 $pkgname.rc "$pkgdir/etc/rc.d/$pkgname"
|
||||
install -Dm 644 $pkgname.conf "$pkgdir/etc/conf.d/$pkgname"
|
||||
install -Dm 644 $pkgname.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||
install -Dm 755 $pkgname.systemd "$pkgdir/usr/lib/systemd/scripts/$pkgname"
|
||||
}
|
||||
|
||||
|
|
|
@ -2,40 +2,16 @@
|
|||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
|
||||
[[ -f /etc/conf.d/cpupower ]] && . /etc/conf.d/cpupower
|
||||
. /etc/conf.d/${0##*/}
|
||||
|
||||
case "$1" in
|
||||
start|restart)
|
||||
stat_busy "Setting cpupower rules"
|
||||
declare -i fail=0
|
||||
|
||||
# frequency-set options
|
||||
declare -a params=()
|
||||
params+=(${governor:+-g $governor})
|
||||
params+=(${min_freq:+-d $min_freq})
|
||||
params+=(${max_freq:+-u $max_freq})
|
||||
params+=(${freq:+-f $freq})
|
||||
if ((${#params[@]} > 0)); then
|
||||
cpupower frequency-set "${params[@]}" >/dev/null || fail=1
|
||||
fi
|
||||
|
||||
# set options
|
||||
declare -a params=()
|
||||
params+=(${mc_scheduler:+-m $mc_scheduler})
|
||||
params+=(${smp_scheduler:+-s $smp_scheduler})
|
||||
params+=(${perf_bias:+-b $perf_bias})
|
||||
if ((${#params[@]} > 0)); then
|
||||
cpupower set "${params[@]}" >/dev/null || fail=1
|
||||
fi
|
||||
|
||||
# print failure if any
|
||||
(($fail > 0)) && stat_fail && exit 1 || stat_done
|
||||
status 'Setting cpupower rules' /usr/lib/systemd/scripts/cpupower || exit 1
|
||||
;;
|
||||
*)
|
||||
echo "usage: ${0##*/} {start|restart}"
|
||||
echo "usage: ${0##*/} {start|restart}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
true
|
||||
|
||||
# vim:set ts=2 sw=2 ft=sh et:
|
||||
|
|
|
@ -3,7 +3,7 @@ Description=Apply cpupower configuration
|
|||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/etc/rc.d/cpupower start
|
||||
ExecStart=/usr/lib/systemd/scripts/cpupower
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
|
|
32
community/linux-tools/cpupower.systemd
Normal file
32
community/linux-tools/cpupower.systemd
Normal file
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/conf.d/cpupower
|
||||
|
||||
declare -i fail=0
|
||||
|
||||
# parse frequency options
|
||||
declare -a params=()
|
||||
params+=(${governor:+-g $governor})
|
||||
params+=(${min_freq:+-d $min_freq})
|
||||
params+=(${max_freq:+-u $max_freq})
|
||||
params+=(${freq:+-f $freq})
|
||||
|
||||
# apply frequency options
|
||||
if ((${#params[@]} > 0)); then
|
||||
cpupower frequency-set "${params[@]}" >/dev/null || fail=1
|
||||
fi
|
||||
|
||||
# parse cpu options
|
||||
declare -a params=()
|
||||
params+=(${mc_scheduler:+-m $mc_scheduler})
|
||||
params+=(${smp_scheduler:+-s $smp_scheduler})
|
||||
params+=(${perf_bias:+-b $perf_bias})
|
||||
|
||||
# apply cpu options
|
||||
if ((${#params[@]} > 0)); then
|
||||
cpupower set "${params[@]}" >/dev/null || fail=1
|
||||
fi
|
||||
|
||||
exit $fail
|
||||
|
||||
# vim:set ts=2 sw=2 ft=sh et:
|
Loading…
Reference in a new issue