aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorM.Dinslage <daedra1980@gmail.com>2022-04-01 05:01:01 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-04-02 18:18:59 +0700
commit77592f81cf46c20ef33003249af7f04a5347a812 (patch)
treef18463b5ece4ef22f4c513f2c65a7c5fadd6fdf1 /system
parent9f58ca4656a4ef1d9b22cbd9ec92b8abf23913c7 (diff)
system/openrazer-daemon: Added (Razer Drivers for Linux).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system')
-rw-r--r--system/openrazer-daemon/README24
-rw-r--r--system/openrazer-daemon/doinst.sh10
-rw-r--r--system/openrazer-daemon/openrazer-daemon.SlackBuild128
-rw-r--r--system/openrazer-daemon/openrazer-daemon.info10
-rw-r--r--system/openrazer-daemon/slack-desc19
5 files changed, 191 insertions, 0 deletions
diff --git a/system/openrazer-daemon/README b/system/openrazer-daemon/README
new file mode 100644
index 000000000000..2120058111af
--- /dev/null
+++ b/system/openrazer-daemon/README
@@ -0,0 +1,24 @@
+OpenRazer is an entirely open source driver and user-space daemon
+that allows you to manage your Razer peripherals on GNU/Linux.
+OpenRazer consists of a driver, a daemon and a Python library.
+
+In order for OpenRazer to work your user must a member of the
+plugdev group. A system reboot is recommended so the user group
+change takes effect, and to bind the OpenRazer driver.
+You also must load the kernel module (provided with the
+openrazer-kernel) with "modprobe razerkbd".
+
+To have this module load automatically at boot time, add the
+module to /etc/rc.d/rc.modules.local. Sometimes hot plugging your
+device while openrazer-deamon is running is necessary for it to
+recognize your razer device.
+
+OpenRazer is just a backend, it doesn't provide a graphical user
+interface for device configuration.
+For GUI configuration there are three programs available here at SBo:
+
+1) Polychromatic (Most feature rich, best looking, most recommended)
+2) Razergenie (QT5 based GUI)
+3) Razercommander (GTK3 based GUI)
+
+For device compatibility see the projects homepage.
diff --git a/system/openrazer-daemon/doinst.sh b/system/openrazer-daemon/doinst.sh
new file mode 100644
index 000000000000..a25271d80c7e
--- /dev/null
+++ b/system/openrazer-daemon/doinst.sh
@@ -0,0 +1,10 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications
+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/openrazer-daemon/openrazer-daemon.SlackBuild b/system/openrazer-daemon/openrazer-daemon.SlackBuild
new file mode 100644
index 000000000000..d27d5a86d842
--- /dev/null
+++ b/system/openrazer-daemon/openrazer-daemon.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/bash
+
+# Slackware build script for openrazer-daemon
+
+# Copyright 2021 Matt Dinslage (daedra1980@gmail.com), 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=openrazer-daemon
+VERSION=${VERSION:-3.2.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+SRCNAM=openrazer
+
+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 $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.xz
+cd $SRCNAM-$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 {} \;
+
+# Fix MANDIR
+sed -i 's,/share/man,/man,g' daemon/Makefile
+
+make python_library_install DESTDIR=$PKG
+make daemon_install DESTDIR=$PKG
+make udev_install DESTDIR=$PKG
+
+# Not a systemd distro
+rm -r $PKG/usr/lib/systemd
+
+# Add scalable icons
+mkdir -p $PKG/usr/share/icons/hicolor/scalable/apps/
+cp logo/*.svg $PKG/usr/share/icons/hicolor/scalable/apps/
+
+# Add application icons
+for i in 16 24 32 48 64 96 128 256; do
+ mkdir -p $PKG/usr/share/icons/hicolor/${i}x${i}/apps
+ convert -background none $PKG/usr/share/icons/hicolor/scalable/apps/openrazer-chroma.svg -resize ${i}x${i} \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/openrazer-chroma.png
+ convert -background none $PKG/usr/share/icons/hicolor/scalable/apps/openrazer-static.svg -resize ${i}x${i} \
+ $PKG/usr/share/icons/hicolor/${i}x${i}/apps/openrazer-static.png
+done
+
+# Add Launcher
+mkdir -p $PKG/usr/share/applications
+cat install_files/desktop/openrazer-daemon.desktop > $PKG/usr/share/applications/openrazer-daemon.desktop
+sed -i 's,/usr/share/pixmaps/python3.xpm,openrazer-chroma,g' \
+ $PKG/usr/share/applications/openrazer-daemon.desktop
+sed -i '10iCategories=Utility;' $PKG/usr/share/applications/openrazer-daemon.desktop
+
+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 \
+ 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/openrazer-daemon/openrazer-daemon.info b/system/openrazer-daemon/openrazer-daemon.info
new file mode 100644
index 000000000000..2159b130e7c8
--- /dev/null
+++ b/system/openrazer-daemon/openrazer-daemon.info
@@ -0,0 +1,10 @@
+PRGNAM="openrazer-daemon"
+VERSION="3.2.0"
+HOMEPAGE="https://openrazer.github.io/"
+DOWNLOAD="https://github.com/openrazer/openrazer/releases/download/v3.2.0/openrazer-3.2.0.tar.xz"
+MD5SUM="73c4dff1139e7fa8a28fe4ae9bcacce4"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="setproctitle pyudev numpy3 python-daemonize openrazer-kernel"
+MAINTAINER="M.Dinslage"
+EMAIL="daedra1980@gmail.com"
diff --git a/system/openrazer-daemon/slack-desc b/system/openrazer-daemon/slack-desc
new file mode 100644
index 000000000000..3bdf29d1a4d9
--- /dev/null
+++ b/system/openrazer-daemon/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------------------------------------------------------|
+openrazer-daemon: openrazer-daemon (Razer Drivers for Linux)
+openrazer-daemon:
+openrazer-daemon: An entirely open source driver and user-space daemon that allows
+openrazer-daemon: you to manage your Razer peripherals on GNU/Linux.
+openrazer-daemon:
+openrazer-daemon:
+openrazer-daemon:
+openrazer-daemon:
+openrazer-daemon:
+openrazer-daemon:
+openrazer-daemon: