mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
system/corectrl: Added (Core control application)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
6d1e605b15
commit
75ed925c50
8 changed files with 222 additions and 0 deletions
11
system/corectrl/README
Normal file
11
system/corectrl/README
Normal file
|
@ -0,0 +1,11 @@
|
|||
corectrl (Core control application)
|
||||
|
||||
CoreCtrl is a Free and Open Source GNU/Linux application that
|
||||
allows you to control with ease your computer hardware using
|
||||
application profiles.
|
||||
|
||||
It aims to be flexible, comfortable, and accessible to regular
|
||||
users.
|
||||
|
||||
Homepage: https://gitlab.com/corectrl/corectrl/
|
||||
|
35
system/corectrl/README.SBo
Normal file
35
system/corectrl/README.SBo
Normal file
|
@ -0,0 +1,35 @@
|
|||
Launch CoreCtrl on session startup
|
||||
|
||||
Execute this command on a terminal:
|
||||
|
||||
cp /usr/share/applications/org.corectrl.corectrl.desktop ~/.config/autostart/org.corectrl.corectrl.desktop
|
||||
|
||||
Don't ask for user password
|
||||
|
||||
CoreCtrl uses a helper with root privileges to control your system. In order to start the helper, the system will ask you to enter your user password. If you want to avoid being asked every time for your password, you can grant root access to the helper permanently.
|
||||
|
||||
Create the file /etc/polkit-1/rules.d/90-corectrl.rules with the following contents:
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if ((action.id == "org.corectrl.helper.init" ||
|
||||
action.id == "org.corectrl.helperkiller.init") &&
|
||||
subject.local == true &&
|
||||
subject.active == true &&
|
||||
subject.isInGroup("your-user-group")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
Replace your-user-group with your user group name.
|
||||
|
||||
Full AMD GPU controls
|
||||
|
||||
Currently, to have full control of your AMD GPU while using the amdgpu driver, you need to append the boot parameter amdgpu.ppfeaturemask=0xffffffff to your bootloader configuration and reboot.
|
||||
NOTE: The following instructions are for guidance only. Check your distribution documentation on how to add a boot parameter before proceed.
|
||||
If your system uses Grub, edit the file (as root) /etc/default/grub and append the parameter to GRUB_CMDLINE_LINUX_DEFAULT:
|
||||
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="<other_params>... amdgpu.ppfeaturemask=0xffffffff"
|
||||
Then regenerate (as root) the bootloader configuration file with the command:
|
||||
|
||||
grub-mkconfig -o /boot/grub/grub.cfg
|
||||
Reboot your system.
|
||||
You should have more controls when you select Advanced as Performance mode.
|
115
system/corectrl/corectrl.SlackBuild
Normal file
115
system/corectrl/corectrl.SlackBuild
Normal file
|
@ -0,0 +1,115 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Slackware build script for corectrl
|
||||
|
||||
# Copyright 2022 Matthew A. Miller Salina,Kansas,USA
|
||||
# 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.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=corectrl
|
||||
VERSION=${VERSION:-v1.3.0}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
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 {} \;
|
||||
|
||||
# Patch resources/launcher.desktop so that the program shows up in only
|
||||
# one category, e.g. System:
|
||||
patch -p1 < $CWD/corectrl.patch
|
||||
|
||||
# Patch src/CMakefiles.txt such that libraries are placed in /usr/lib64:
|
||||
patch -p1 < $CWD/install_libs_in_lib64_directory.patch
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_FULL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_TESTING=OFF ..
|
||||
|
||||
make
|
||||
make install/strip DESTDIR=$PKG
|
||||
cd ..
|
||||
|
||||
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
||||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a COPYING LICENSE $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
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|
10
system/corectrl/corectrl.info
Normal file
10
system/corectrl/corectrl.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="corectrl"
|
||||
VERSION="v1.3.0"
|
||||
HOMEPAGE="https://gitlab.com/corectrl/corectrl/"
|
||||
DOWNLOAD="https://gitlab.com/corectrl/corectrl/-/archive/v1.3.0/corectrl-v1.3.0.tar.gz"
|
||||
MD5SUM="e18c43e86d304682b031b8489d2221ca"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="Botan"
|
||||
MAINTAINER="Matthew Miller"
|
||||
EMAIL="mattallmill@gmail.com"
|
11
system/corectrl/corectrl.patch
Normal file
11
system/corectrl/corectrl.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- corectrl-v1.3.0/resources/launcher.desktop 2022-09-18 12:56:52.000000000 -0500
|
||||
+++ corectrl-v1.3.0/resources/launcher.desktop.new 2022-10-04 15:05:55.822235127 -0500
|
||||
@@ -8,7 +8,7 @@
|
||||
StartupWMClass=corectrl
|
||||
Terminal=false
|
||||
Type=Application
|
||||
-Categories=System;Settings;Utility;
|
||||
+Categories=System;
|
||||
Keywords=core;control;system;hardware;
|
||||
|
||||
# Translations
|
9
system/corectrl/doinst.sh
Normal file
9
system/corectrl/doinst.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
|
||||
if [ -x /usr/bin/gtk-update-icon-cache ]; then
|
||||
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
12
system/corectrl/install_libs_in_lib64_directory.patch
Normal file
12
system/corectrl/install_libs_in_lib64_directory.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- corectrl-v1.3.0/src/CMakeLists.txt 2022-09-18 12:56:52.000000000 -0500
|
||||
+++ corectrl-v1.3.0/src/CMakeLists.txt.new 2022-10-05 11:51:27.147208476 -0500
|
||||
@@ -417,7 +417,7 @@
|
||||
)
|
||||
|
||||
install(TARGETS corectrl corectrl_lib
|
||||
- RUNTIME DESTINATION bin
|
||||
- LIBRARY DESTINATION lib)
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
|
||||
|
||||
add_subdirectory(helper)
|
19
system/corectrl/slack-desc
Normal file
19
system/corectrl/slack-desc
Normal file
|
@ -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------------------------------------------------------|
|
||||
corectrl: corectrl (Core control application)
|
||||
corectrl:
|
||||
corectrl: CoreCtrl is a Free and Open Source GNU/Linux application that
|
||||
corectrl: allows you to control with ease your computer hardware using
|
||||
corectrl: application profiles.
|
||||
corectrl:
|
||||
corectrl: It aims to be flexible, comfortable, and accessible to regular
|
||||
corectrl: users.
|
||||
corectrl:
|
||||
corectrl: Homepage: https://gitlab.com/corectrl/corectrl/
|
||||
corectrl:
|
Loading…
Reference in a new issue