mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
system/pstate-frequency: Updated for version 3.5.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
a96cd2882c
commit
46150f0ac8
3 changed files with 80 additions and 29 deletions
|
@ -5,20 +5,38 @@ the state of turbo boost.
|
||||||
You can enable optional feature by passing variables to
|
You can enable optional feature by passing variables to
|
||||||
the script (ie. VAR=yes/no ./pstate-frequency.SlackBuild) :
|
the script (ie. VAR=yes/no ./pstate-frequency.SlackBuild) :
|
||||||
|
|
||||||
WITH_UDEV_RULE=yes|no (default:no)
|
WITH_POWER_PLANS=yes|no (default=yes)
|
||||||
Installs an udev rule for automatic frequency setting
|
Installs power plans in /etc/pstate-frequency.d/
|
||||||
when the power source thas changed.
|
|
||||||
|
|
||||||
WITH_COMPLETION=yes|no (default:no)
|
|
||||||
Installs bash & zsh completion.
|
|
||||||
|
|
||||||
Optional Dependencies :
|
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 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 :
|
||||||
|
|
||||||
* x86_energy_perf_policy
|
* x86_energy_perf_policy
|
||||||
This is used to set the CPU to normal performance
|
This is used to set the CPU to normal performance
|
||||||
policy upon suspend and resume. It is used to
|
policy upon suspend and resume. It is used to
|
||||||
currently work around an assumed bug whereby on
|
currently work around an assumed bug whereby on
|
||||||
resume the system is set to performance policy on
|
resume the system is set to performance policy on
|
||||||
one core. It can help fix issues where upon resume
|
one core. It can help fix issues where upon resume
|
||||||
of the system, the CPU runs at frequencies higher
|
of the system, the CPU runs at frequencies higher
|
||||||
than that which is advertised to be available.
|
than that which is advertised to be available.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=pstate-frequency
|
PRGNAM=pstate-frequency
|
||||||
VERSION=${VERSION:-3.4.1}
|
VERSION=${VERSION:-3.5.1}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
|
@ -35,8 +35,12 @@ if [ -z "$ARCH" ]; then
|
||||||
esac
|
esac
|
||||||
fi
|
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_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)
|
CWD=$(pwd)
|
||||||
TMP=${TMP:-/tmp/SBo}
|
TMP=${TMP:-/tmp/SBo}
|
||||||
|
@ -64,21 +68,50 @@ find -L . \
|
||||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||||
|
|
||||||
mkdir -p $PKG/usr/bin
|
[ "${WITH_POWER_PLANS}" != "no" ] && __INCLUDE_POWER_PLANS=1 || __INCLUDE_POWER_PLANS=0
|
||||||
install -m 755 pstate-frequency -t $PKG/usr/bin
|
[ "${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
|
||||||
|
|
||||||
if [ "$WITH_UDEV_RULE" != "no" ] ; then
|
make install DESTDIR="$PKG" \
|
||||||
mkdir -p $PKG/etc/udev/rules.d
|
PREFIX="/usr" \
|
||||||
install -m 644 res/udev/99-pstate-frequency.rules -t $PKG/etc/udev/rules.d
|
INCLUDE_POWER_PLANS=${__INCLUDE_POWER_PLANS} \
|
||||||
fi
|
INCLUDE_BASH_COMPLETION=${__INCLUDE_BASH_COMPLETION} \
|
||||||
|
INCLUDE_ZSH_COMPLETION=${__INCLUDE_ZSH_COMPLETION} \
|
||||||
if [ "$WITH_COMPLETION" != "no" ] ; then
|
INCLUDE_SYSTEMD_UNIT=${__INCLUDE_SYSTEMD_UNIT} \
|
||||||
install -D -m 644 res/shell/bash/bash_completion $PKG/usr/share/bash-completion/completions/pstate-frequency
|
INCLUDE_UDEV_RULE=${__INCLUDE_UDEV_RULE} \
|
||||||
install -D -m 644 res/shell/zsh/zsh_completion $PKG/usr/share/zsh/site-functions/_pstate-frequency
|
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
|
fi
|
||||||
|
|
||||||
|
# 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
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a LICENSE README.md $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
|
||||||
|
|
||||||
|
|
||||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
PRGNAM="pstate-frequency"
|
PRGNAM="pstate-frequency"
|
||||||
VERSION="3.4.1"
|
VERSION="3.5.1"
|
||||||
HOMEPAGE="https://github.com/pyamsoft/pstate-frequency"
|
HOMEPAGE="https://github.com/pyamsoft/pstate-frequency"
|
||||||
DOWNLOAD="https://github.com/pyamsoft/pstate-frequency/archive/3.4.1.tar.gz"
|
DOWNLOAD="https://github.com/pyamsoft/pstate-frequency/archive/3.5.1.tar.gz"
|
||||||
MD5SUM="cc90e44e1e2713353b7ee361bd1386d3"
|
MD5SUM="8c80c9cfbb8ff8090cc11bf1cc9a5da6"
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
REQUIRES=""
|
REQUIRES=""
|
||||||
|
|
Loading…
Reference in a new issue