libraries/libgaminggear: Clarified option to use custom group

This commit is contained in:
Gerardo Zamudio 2019-10-12 10:56:46 -05:00 committed by Willy Sudiarto Raharjo
parent 585c115a23
commit 218630f0fe
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 16 additions and 6 deletions

View file

@ -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

View file

@ -2,7 +2,7 @@
# Slackware build script for libgaminggear
# Copyright 2015-2016 Gerardo Zamudio <gerardo.zamudio@linux.com> Mexico City, Mexico
# Copyright 2019 Gerardo Zamudio <gerardo.zamudio@linux.com> 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