diff options
author | Matthew Miller <mattallmill@gmail.com> | 2022-10-05 18:17:30 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-10-08 09:12:44 +0700 |
commit | 75ed925c5049dd60c187d786e3650e8f516cace1 (patch) | |
tree | 43b2ee8e4a89f0a4d8ba3e4ea7f8dce1ff6fe392 | |
parent | 6d1e605b15fa49ae7644cb1196ded5148c229bb6 (diff) | |
download | slackbuilds-75ed925c5049dd60c187d786e3650e8f516cace1.tar.gz |
system/corectrl: Added (Core control application)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/corectrl/README | 11 | ||||
-rw-r--r-- | system/corectrl/README.SBo | 35 | ||||
-rw-r--r-- | system/corectrl/corectrl.SlackBuild | 115 | ||||
-rw-r--r-- | system/corectrl/corectrl.info | 10 | ||||
-rw-r--r-- | system/corectrl/corectrl.patch | 11 | ||||
-rw-r--r-- | system/corectrl/doinst.sh | 9 | ||||
-rw-r--r-- | system/corectrl/install_libs_in_lib64_directory.patch | 12 | ||||
-rw-r--r-- | system/corectrl/slack-desc | 19 |
8 files changed, 222 insertions, 0 deletions
diff --git a/system/corectrl/README b/system/corectrl/README new file mode 100644 index 0000000000..d1f955a7d0 --- /dev/null +++ b/system/corectrl/README @@ -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/ + diff --git a/system/corectrl/README.SBo b/system/corectrl/README.SBo new file mode 100644 index 0000000000..c0ca22f31b --- /dev/null +++ b/system/corectrl/README.SBo @@ -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. diff --git a/system/corectrl/corectrl.SlackBuild b/system/corectrl/corectrl.SlackBuild new file mode 100644 index 0000000000..802cbcf3fb --- /dev/null +++ b/system/corectrl/corectrl.SlackBuild @@ -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 diff --git a/system/corectrl/corectrl.info b/system/corectrl/corectrl.info new file mode 100644 index 0000000000..6ebcf115bf --- /dev/null +++ b/system/corectrl/corectrl.info @@ -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" diff --git a/system/corectrl/corectrl.patch b/system/corectrl/corectrl.patch new file mode 100644 index 0000000000..bd92a1e54f --- /dev/null +++ b/system/corectrl/corectrl.patch @@ -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 diff --git a/system/corectrl/doinst.sh b/system/corectrl/doinst.sh new file mode 100644 index 0000000000..625ced33d1 --- /dev/null +++ b/system/corectrl/doinst.sh @@ -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 diff --git a/system/corectrl/install_libs_in_lib64_directory.patch b/system/corectrl/install_libs_in_lib64_directory.patch new file mode 100644 index 0000000000..22b15b8a8b --- /dev/null +++ b/system/corectrl/install_libs_in_lib64_directory.patch @@ -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) diff --git a/system/corectrl/slack-desc b/system/corectrl/slack-desc new file mode 100644 index 0000000000..57ba8c3512 --- /dev/null +++ b/system/corectrl/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------------------------------------------------------| +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: |