aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorM.Dinslage <daedra1980@gmail.com>2022-04-01 05:03:42 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-02 18:18:59 +0700
commit9f1da54123fdf4783898aa29a82286af2976a03d (patch)
tree909ed7a0c9117b90e7687c3c2d9870f7844cf8c7 /system
parent77592f81cf46c20ef33003249af7f04a5347a812 (diff)
system/polychromatic: Added (GUI frontend for openrazer).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/polychromatic/README9
-rw-r--r--system/polychromatic/doinst.sh10
-rw-r--r--system/polychromatic/polychromatic.SlackBuild138
-rw-r--r--system/polychromatic/polychromatic.info10
-rw-r--r--system/polychromatic/slack-desc19
5 files changed, 186 insertions, 0 deletions
diff --git a/system/polychromatic/README b/system/polychromatic/README
new file mode 100644
index 000000000000..bd37f89272ca
--- /dev/null
+++ b/system/polychromatic/README
@@ -0,0 +1,9 @@
+Polychromatic is a vendor agnostic front-end for managing lighting,
+RGB effects and some special functionality for keyboards, mice,
+keypads and just about any other gaming peripheral on your GNU/Linux
+system. The software aims to make it easy to create and co-ordinate
+lighting effects that work across all compatible hardware, even if
+you switch to another brand also supported by Polychromatic.
+
+Currently the only supported backend for polychromatic is openrazer.
+
diff --git a/system/polychromatic/doinst.sh b/system/polychromatic/doinst.sh
new file mode 100644
index 000000000000..a993650058d7
--- /dev/null
+++ b/system/polychromatic/doinst.sh
@@ -0,0 +1,10 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+# If other icon themes are installed, then add to/modify this as needed
+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
diff --git a/system/polychromatic/polychromatic.SlackBuild b/system/polychromatic/polychromatic.SlackBuild
new file mode 100644
index 000000000000..604eb5c4fd26
--- /dev/null
+++ b/system/polychromatic/polychromatic.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/bash
+
+# Slackware build script for polychromatic
+
+# Copyright 2021, Matt Dinslage, Springfield, MO
+# 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=polychromatic
+VERSION=${VERSION:-0.7.3}
+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 {} \;
+
+mkdir build
+cd build
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ meson .. \
+ --buildtype=release \
+ --infodir=/usr/info \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ -Dstrip=true
+ "${NINJA:=ninja}"
+ DESTDIR=$PKG $NINJA install
+cd ..
+
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+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
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Move application launcher to applications. This way we keep all
+# the razer apps in the same category.
+sed -i 's,Categories=Settings;HardwareSettings;,Categories=Utility;,g' \
+ $PKG/usr/share/applications/polychromatic.desktop
+
+# Mate desktop has an issue with polychromatic tray icons not being
+# sized properly. They're displayed at their native size. Use this
+# as a workaround. This issue does not affect KDE or XFce.
+if [ -f /usr/bin/mate-about ] ; then
+ for dir in $(ls $PKG/usr/share/$PRGNAM/img) ; do
+ mkdir -p $TMP/$dir
+ for i in $(ls $PKG/usr/share/$PRGNAM/img/$dir | grep svg | rev | cut -c5- | rev) ; do
+ rsvg-convert -a -w 24 -h 24 -f svg $PKG/usr/share/$PRGNAM/img/$dir/$i.svg -o $TMP/$dir/$i.svg
+ rm $PKG/usr/share/$PRGNAM/img/$dir/$i.svg
+ cp $TMP/$dir/$i.svg $PKG/usr/share/$PRGNAM/img/$dir/$i.svg
+ done
+ rm -r $TMP/$dir
+ done
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ CHANGELOG 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
+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/polychromatic/polychromatic.info b/system/polychromatic/polychromatic.info
new file mode 100644
index 000000000000..3243d382ea49
--- /dev/null
+++ b/system/polychromatic/polychromatic.info
@@ -0,0 +1,10 @@
+PRGNAM="polychromatic"
+VERSION="0.7.3"
+HOMEPAGE="https://polychromatic.app/"
+DOWNLOAD="https://github.com/polychromatic/polychromatic/archive/v0.7.3/polychromatic-0.7.3.tar.gz"
+MD5SUM="13fdf0f8e1fbd9f6301d3a82765df831"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="openrazer-daemon colorama python-colour python3-PyQtWebEngine"
+MAINTAINER="M.Dinslage"
+EMAIL="daedra1980@gmail.com"
diff --git a/system/polychromatic/slack-desc b/system/polychromatic/slack-desc
new file mode 100644
index 000000000000..9fd750a46e8b
--- /dev/null
+++ b/system/polychromatic/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+polychromatic: polychromatic (GUI frontend for openrazer)
+polychromatic:
+polychromatic: Polychromatic is a vendor agnostic front-end for managing lighting,
+polychromatic: RGB effects and some special functionality for keyboards, mice,
+polychromatic: keypads and just about any other gaming peripheral on your GNU/Linux
+polychromatic: system. The software aims to make it easy to create and co-ordinate
+polychromatic: lighting effects that work across all compatible hardware, even if
+polychromatic: you switch to another brand also supported by Polychromatic.
+polychromatic:
+polychromatic:
+polychromatic: