From 218630f0fe815b2c11d701225286b1d46e2c328d Mon Sep 17 00:00:00 2001 From: Gerardo Zamudio Date: Sat, 12 Oct 2019 10:56:46 -0500 Subject: libraries/libgaminggear: Clarified option to use custom group --- libraries/libgaminggear/README | 11 ++++++++--- libraries/libgaminggear/libgaminggear.SlackBuild | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'libraries/libgaminggear') diff --git a/libraries/libgaminggear/README b/libraries/libgaminggear/README index 9253e2a310..d780116168 100644 --- a/libraries/libgaminggear/README +++ b/libraries/libgaminggear/README @@ -3,10 +3,15 @@ devices. For input events to work for users (needed for software macros and such) they need access rights for uinput or uhid. To use them as normal user -you should create an extra group like +you should create an extra group. The default is uinput-users but you +can specify a different group before running the script: - # groupadd -r -g 317 uinput-users +GROUP="groupname" ./libgaminggear.SlackBuild + +You will need to create the group + + # groupadd -r -g 317 $GROUP and add all needed users to this group - # usermod -a -G uinput-users $USER + # usermod -a -G $GROUP $USER diff --git a/libraries/libgaminggear/libgaminggear.SlackBuild b/libraries/libgaminggear/libgaminggear.SlackBuild index e37f534127..2b4ed5a9b3 100644 --- a/libraries/libgaminggear/libgaminggear.SlackBuild +++ b/libraries/libgaminggear/libgaminggear.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for libgaminggear -# Copyright 2015-2016 Gerardo Zamudio Mexico City, Mexico +# Copyright 2019 Gerardo Zamudio Mexico City, Mexico # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -24,7 +24,7 @@ PRGNAM=libgaminggear VERSION=${VERSION:-0.15.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -58,7 +58,7 @@ set -e GROUP=${GROUP:-uinput-users} -# Check the system group for uinput-users: +# Check the system group exists: if ! grep -q ^"$GROUP": /etc/group ; then echo " You will need a system group to add users to for input events to work" echo " # groupadd -r -g 317 $GROUP" @@ -99,6 +99,11 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr mkdir -p $PKG/lib/udev/rules.d install -m 644 $CWD/90-uinput.rules $PKG/lib/udev/rules.d/ +# In case the default group was changed: +if [ "$GROUP" != "uinput-users" ]; then + sed -i "s|uinput-users|$GROUP|g" $PKG/lib/udev/rules.d/90-uinput.rules +fi + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3