aboutsummaryrefslogtreecommitdiff
path: root/system/pstate-frequency
diff options
context:
space:
mode:
authorSébastien Ballet <slacker6896@gmail.com>2016-09-18 16:26:41 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-09-18 16:26:41 +0700
commit56e095f5ec18141271d24a217278e949826f18c7 (patch)
tree1509b0eed9b85b131c5b078964c049716a63841c /system/pstate-frequency
parentec13afdbfdeb8ecccff714cc67d87de4bccbbde1 (diff)
system/pstate-frequency: Added (Control Intel p-state driver).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/pstate-frequency')
-rw-r--r--system/pstate-frequency/README24
-rw-r--r--system/pstate-frequency/pstate-frequency.SlackBuild89
-rw-r--r--system/pstate-frequency/pstate-frequency.info10
-rw-r--r--system/pstate-frequency/slack-desc19
4 files changed, 142 insertions, 0 deletions
diff --git a/system/pstate-frequency/README b/system/pstate-frequency/README
new file mode 100644
index 000000000000..4752b086fa55
--- /dev/null
+++ b/system/pstate-frequency/README
@@ -0,0 +1,24 @@
+pstate-frequency is able to adjust the Intel p-state driver
+values for the minimum and maximum scaling frequencies and
+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)
+ Installs an udev rule for automatic frequency setting
+ when the power source thas changed.
+
+WITH_COMPLETION=yes|no (default:no)
+ Installs bash & zsh completion.
+
+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
+ than that which is advertised to be available.
diff --git a/system/pstate-frequency/pstate-frequency.SlackBuild b/system/pstate-frequency/pstate-frequency.SlackBuild
new file mode 100644
index 000000000000..55d2b4ee6616
--- /dev/null
+++ b/system/pstate-frequency/pstate-frequency.SlackBuild
@@ -0,0 +1,89 @@
+#!/bin/sh
+
+# Slackware build script for pstate-frequency
+
+# Copyright 2016 Sébastien Ballet France
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=pstate-frequency
+VERSION=${VERSION:-3.4.1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm; echo "Unsupported arch $ARCH"; exit 1;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+WITH_UDEV_RULE=${WITH_UDEV_RULE:-no}
+WITH_COMPLETION=${WITH_COMPLETION:-no}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+
+if [ -e $CWD/$VERSION.tar.gz ]; then
+ tar xvf $CWD/$VERSION.tar.gz
+else
+ tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+fi
+
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -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
+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
+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
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/pstate-frequency/pstate-frequency.info b/system/pstate-frequency/pstate-frequency.info
new file mode 100644
index 000000000000..572fc8099cff
--- /dev/null
+++ b/system/pstate-frequency/pstate-frequency.info
@@ -0,0 +1,10 @@
+PRGNAM="pstate-frequency"
+VERSION="3.4.1"
+HOMEPAGE="https://github.com/pyamsoft/pstate-frequency"
+DOWNLOAD="https://github.com/pyamsoft/pstate-frequency/archive/3.4.1.tar.gz"
+MD5SUM="cc90e44e1e2713353b7ee361bd1386d3"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Sébastien Ballet"
+EMAIL="slacker6896@gmail.com"
diff --git a/system/pstate-frequency/slack-desc b/system/pstate-frequency/slack-desc
new file mode 100644
index 000000000000..e0625c3f2fd4
--- /dev/null
+++ b/system/pstate-frequency/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+pstate-frequency: pstate-frequency (Easily control Intel p-state driver)
+pstate-frequency:
+pstate-frequency: pstate-frequency is able to adjust the Intel p-state driver
+pstate-frequency: values for the minimum and maximum scaling frequencies and
+pstate-frequency: the state of turbo boost.
+pstate-frequency:
+pstate-frequency:
+pstate-frequency:
+pstate-frequency: https://github.com/pyamsoft/pstate-frequency
+pstate-frequency:
+pstate-frequency: