diff options
author | Sébastien Ballet <slacker6896@gmail.com> | 2016-09-29 18:17:59 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-10-01 07:17:23 +0700 |
commit | 46150f0ac886f0d48f308274ec36452b36f1b638 (patch) | |
tree | eda2eb61828d0abafa2563a4edb0785af28764f3 /system | |
parent | a96cd2882c4e606bd3468ed6670316732f93b38a (diff) |
system/pstate-frequency: Updated for version 3.5.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r-- | system/pstate-frequency/README | 42 | ||||
-rw-r--r-- | system/pstate-frequency/pstate-frequency.SlackBuild | 59 | ||||
-rw-r--r-- | system/pstate-frequency/pstate-frequency.info | 6 |
3 files changed, 79 insertions, 28 deletions
diff --git a/system/pstate-frequency/README b/system/pstate-frequency/README index 4752b086fa556..a0bd9d45954e7 100644 --- a/system/pstate-frequency/README +++ b/system/pstate-frequency/README @@ -5,20 +5,38 @@ the state of turbo boost. You can enable optional feature by passing variables to the script (ie. VAR=yes/no ./pstate-frequency.SlackBuild) : -WITH_UDEV_RULE=yes|no (default:no) +WITH_POWER_PLANS=yes|no (default=yes) + Installs power plans in /etc/pstate-frequency.d/ + + Power Plans are convenience shortcuts which essentially + alias to calling pstate-frequency with various options. + They are not necessary for operation, but are recommended. + +WITH_BASH_COMPLETION=yes|no (default=no) + Installs bash completion. + +WITH_ZSH_COMPLETION=yes|no (default=no) + Installs zsh completion. + +WITH_UDEV_RULE=yes|no (default=no) Installs an udev rule for automatic frequency setting - when the power source thas changed. - -WITH_COMPLETION=yes|no (default:no) - Installs bash & zsh completion. + when the power source has changed. + + The udev rule is installed in directory specified by + environment variable UDEV_RULE_DIR which, by default, + is set to /lib/udev/rules.d. To install rule in, for + instance, /etc/udev/rules.d, run the SlackBuild as + below : + + WITH_UDEV_RULE=yes UDEV_RULE_DIR=/etc/udev/rules.d ./pstate-frequency.SlackBuild -Optional Dependencies : +Optional Dependencies : * x86_energy_perf_policy - This is used to set the CPU to normal performance - policy upon suspend and resume. It is used to - currently work around an assumed bug whereby on - resume the system is set to performance policy on - one core. It can help fix issues where upon resume - of the system, the CPU runs at frequencies higher + This is used to set the CPU to normal performance + policy upon suspend and resume. It is used to + currently work around an assumed bug whereby on + resume the system is set to performance policy on + one core. It can help fix issues where upon resume + of the system, the CPU runs at frequencies higher than that which is advertised to be available. diff --git a/system/pstate-frequency/pstate-frequency.SlackBuild b/system/pstate-frequency/pstate-frequency.SlackBuild index 55d2b4ee66166..dec305ada982d 100644 --- a/system/pstate-frequency/pstate-frequency.SlackBuild +++ b/system/pstate-frequency/pstate-frequency.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=pstate-frequency -VERSION=${VERSION:-3.4.1} +VERSION=${VERSION:-3.5.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -35,8 +35,12 @@ if [ -z "$ARCH" ]; then esac fi +WITH_POWER_PLANS=${WITH_POWER_PLANS:-yes} +WITH_BASH_COMPLETION=${WITH_BASH_COMPLETION:-no} +WITH_ZSH_COMPLETION=${WITH_ZSH_COMPLETION:-no} +WITH_SYSTEMD_UNIT=${WITH_SYSTEMD_UNIT:-no} WITH_UDEV_RULE=${WITH_UDEV_RULE:-no} -WITH_COMPLETION=${WITH_COMPLETION:-no} +UDEV_RULE_DIR=${UDEV_RULE_DIR:-/lib/udev/rules.d/} # not used when WITH_UDEV_RULE=no CWD=$(pwd) TMP=${TMP:-/tmp/SBo} @@ -64,21 +68,50 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -mkdir -p $PKG/usr/bin -install -m 755 pstate-frequency -t $PKG/usr/bin - -if [ "$WITH_UDEV_RULE" != "no" ] ; then - mkdir -p $PKG/etc/udev/rules.d - install -m 644 res/udev/99-pstate-frequency.rules -t $PKG/etc/udev/rules.d +[ "${WITH_POWER_PLANS}" != "no" ] && __INCLUDE_POWER_PLANS=1 || __INCLUDE_POWER_PLANS=0 +[ "${WITH_BASH_COMPLETION}" != "no" ] && __INCLUDE_BASH_COMPLETION=1 || __INCLUDE_BASH_COMPLETION=0 +[ "${WITH_ZSH_COMPLETION}" != "no" ] && __INCLUDE_ZSH_COMPLETION=1 || __INCLUDE_ZSH_COMPLETION=0 +[ "${WITH_SYSTEMD_UNIT}" != "no" ] && __INCLUDE_SYSTEMD_UNIT=1 || __INCLUDE_SYSTEMD_UNIT=0 +[ "${WITH_UDEV_RULE}" != "no" ] && __INCLUDE_UDEV_RULE=1 || __INCLUDE_UDEV_RULE=0 + +make install DESTDIR="$PKG" \ +PREFIX="/usr" \ +INCLUDE_POWER_PLANS=${__INCLUDE_POWER_PLANS} \ +INCLUDE_BASH_COMPLETION=${__INCLUDE_BASH_COMPLETION} \ +INCLUDE_ZSH_COMPLETION=${__INCLUDE_ZSH_COMPLETION} \ +INCLUDE_SYSTEMD_UNIT=${__INCLUDE_SYSTEMD_UNIT} \ +INCLUDE_UDEV_RULE=${__INCLUDE_UDEV_RULE} \ +INCLUDE_DOC=1 \ +INCLUDE_LICENSE=1 + +if [ "${WITH_UDEV_RULE}" != "no" ] ; then + # Move udev rule in $PKG/UDEV_RULE_DIR (Makefile install udev rule + # in PKG/usr/lib/udev/rules.d/ + # + mkdir -p $PKG/${UDEV_RULE_DIR} + mv $PKG/usr/lib/udev/rules.d/* $PKG/${UDEV_RULE_DIR} + rm -rf $PKG/usr/lib fi -if [ "$WITH_COMPLETION" != "no" ] ; then - install -D -m 644 res/shell/bash/bash_completion $PKG/usr/share/bash-completion/completions/pstate-frequency - install -D -m 644 res/shell/zsh/zsh_completion $PKG/usr/share/zsh/site-functions/_pstate-frequency + # install docs & Slackbuild + # + # Makefile install Readme.md & license in PKG/usr/share/doc/$PRGNAM, so + # we need to move that in right place (ie. PKG/usr/doc/$PRGNAM-$VERSION) + # + # *Attention*, usr/share is removed when INCLUDE_BASH_COMPLETION and + # INCLUDE_ZSH_COMPLETION are disabled. Otherwise, only usr/share/doc + # must be removed. + # +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION + +mv $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION + +if [ "${WITH_BASH_COMPLETION}" != "no" ] || [ "${WITH_ZSH_COMPLETION}" != "no" ] ; then + rm -rf $PKG/usr/share/doc +else + rm -rf $PKG/usr/share fi -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/system/pstate-frequency/pstate-frequency.info b/system/pstate-frequency/pstate-frequency.info index 572fc8099cffb..7bc18775f10da 100644 --- a/system/pstate-frequency/pstate-frequency.info +++ b/system/pstate-frequency/pstate-frequency.info @@ -1,8 +1,8 @@ PRGNAM="pstate-frequency" -VERSION="3.4.1" +VERSION="3.5.1" HOMEPAGE="https://github.com/pyamsoft/pstate-frequency" -DOWNLOAD="https://github.com/pyamsoft/pstate-frequency/archive/3.4.1.tar.gz" -MD5SUM="cc90e44e1e2713353b7ee361bd1386d3" +DOWNLOAD="https://github.com/pyamsoft/pstate-frequency/archive/3.5.1.tar.gz" +MD5SUM="8c80c9cfbb8ff8090cc11bf1cc9a5da6" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" |