diff options
author | librewish | 2020-03-07 14:21:01 +0530 |
---|---|---|
committer | librewish | 2020-03-07 14:21:01 +0530 |
commit | 2f4bd59432a6b2e6e0c79ce6f2c1845bfd7323e7 (patch) | |
tree | 7d40a2df47f7fef19ee55fbade7e4244211788cc | |
parent | 87a4346c8c3f2d297db6ef20f396343c03b9851f (diff) | |
download | aur-2f4bd59432a6b2e6e0c79ce6f2c1845bfd7323e7.tar.gz |
small changes
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | qwikaccess.install | 51 |
3 files changed, 61 insertions, 6 deletions
@@ -1,8 +1,9 @@ pkgbase = qwikaccess-git pkgdesc = A point and click Qt GUI for scripts we use frequently. - pkgver = 0.0.1.r33.f6a7fed + pkgver = 0.0.1.r35.67f65ca pkgrel = 1 url = https://github.com/librewish/qwikaccess + install = qwikaccess.install arch = any license = GPL3 makedepends = git @@ -12,9 +13,9 @@ pkgbase = qwikaccess-git depends = bluez-utils depends = playerctl depends = libpulse + depends = brightnessctl optdepends = ffmpeg: for screenshot & audio,screen,screencam recording optdepends = v4l-utils: for camera - optdepends = brightnessctl: for brightness up and down optdepends = xorg-xrdb: for autohidpi optdepends = xorg-xrandr: for screen rotation optdepends = xorg-xinput: for autorotation @@ -27,6 +28,8 @@ pkgbase = qwikaccess-git optdepends = xdg-utils: for lock screen (xdg-screensaver lock) optdepends = systemd: for leave commands and gps services optdepends = wmctrl: for screencam ffplay to be on above all windows + optdepends = grim: for wayland screenshot + optdepends = wf-recorder: for wayland screencapture optdepends = grep: used in scripts optdepends = gawk: used in scripts provides = qwikaccess @@ -1,16 +1,15 @@ _pkgname=qwikaccess pkgname=${_pkgname}-git -pkgver=0.0.1.r33.f6a7fed +pkgver=0.0.1.r35.67f65ca pkgrel=1 pkgdesc="A point and click Qt GUI for scripts we use frequently." arch=('any') url="https://github.com/librewish/qwikaccess" license=('GPL3') -depends=('qt5-base' 'polkit' 'libnotify' 'bluez-utils' 'playerctl' 'libpulse') +depends=('qt5-base' 'polkit' 'libnotify' 'bluez-utils' 'playerctl' 'libpulse' 'brightnessctl') optdepends=( 'ffmpeg: for screenshot & audio,screen,screencam recording' 'v4l-utils: for camera' - 'brightnessctl: for brightness up and down' 'xorg-xrdb: for autohidpi' 'xorg-xrandr: for screen rotation' 'xorg-xinput: for autorotation' @@ -23,6 +22,8 @@ optdepends=( 'xdg-utils: for lock screen (xdg-screensaver lock)' 'systemd: for leave commands and gps services' 'wmctrl: for screencam ffplay to be on above all windows' + 'grim: for wayland screenshot' + 'wf-recorder: for wayland screencapture' 'grep: used in scripts' 'gawk: used in scripts' ) @@ -31,7 +32,7 @@ provides=("${pkgname%-git}") conflicts=("${pkgname%-git}") source=("git+https://github.com/librewish/${_pkgname}.git") md5sums=('SKIP') - +install=qwikaccess.install pkgver() { cd "$srcdir/${_pkgname}" printf "%s" "$(git describe --long --tags | sed 's/^v//;s/\([^-]*-\)g/r\1/;s/-/./g')" diff --git a/qwikaccess.install b/qwikaccess.install new file mode 100644 index 000000000000..06686ed586b2 --- /dev/null +++ b/qwikaccess.install @@ -0,0 +1,51 @@ +msg() { + ALL_OFF="\e[1;0m" + BOLD="\e[1;1m" + GREEN="${BOLD}\e[1;32m" + local mesg=$1; shift + printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&2 +} + +add_users() { + _l="/etc/login.defs" + _p="/etc/passwd" + + ## get mini UID limit ## + l=$(grep "^UID_MIN" $_l) + + ## get max UID limit ## + l1=$(grep "^UID_MAX" $_l) + + ## use awk to print if UID >= $MIN and UID <= $MAX and shell is not /sbin/nologin ## + users=$(awk -F':' -v "min=${l##UID_MIN}" -v "max=${l1##UID_MAX}" '{ if ( $3 >= min && $3 <= max && $7 != "/sbin/nologin" ) print $0 }' "$_p" | cut -d: -f1) + for i in $users; do + msg "Adding user '$i' to user-group 'input,video,plugdev'" + usermod -a -G input $i + usermod -a -G video $i + usermod -a -G plugdev $i + done +} + +add_group() { + getent group "input" &>/dev/null || groupadd -r input + getent group "video" &>/dev/null || groupadd -r video + getent group "plugdev" &>/dev/null || groupadd -r plugdev + add_users +} + +post_upgrade() { + add_group + echo "" + msg "Please add new users to 'input,video,plugdev' group." + echo "" +} + +post_install() { + add_group + echo "" + msg "Please add new users to 'input,video,plugdev' group." + msg "Reboot your system, so changes will take effect.." + echo "" +} + +# vim: ts=2 sw=2 et: |