desktop/gtklock: Added (screen locker for Wayland)

Signed-off-by: bedlam <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Jay Lanagan 2023-05-05 20:27:37 +01:00 committed by Willy Sudiarto Raharjo
parent fb69895fae
commit 63d81d1ac5
No known key found for this signature in database
GPG key ID: 3F617144D7238786
5 changed files with 139 additions and 0 deletions

5
desktop/gtklock/README Normal file
View file

@ -0,0 +1,5 @@
gtklock (screen locker for Wayland)
gtklock is a lockscreen based on gtkgreet. It uses the wlr-layer-shell
and wlr-input-inhibitor Wayland protocols. Works on sway and other
wlroots-based compositors.

12
desktop/gtklock/doinst.sh Normal file
View file

@ -0,0 +1,12 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
rm $NEW
fi
}
config etc/pam.d/gtklock.new

View file

@ -0,0 +1,93 @@
#!/bin/bash
# Slackware build script for gtklock
# Written by B. Watson (urchlay@slackware.uk)
# Maintained by Jay Lanagan (j@lngn.net)
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=gtklock
VERSION=${VERSION:-2.0.1}
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 [ ! -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"
elif [ "$ARCH" = "aarch64" ]; 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 /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
# 20230407 bkw: sed surgery. Slackware 15.0 doesn't have a pkg-config
# pam.pc, so we have to remove it from LIBS, then add -lpam to LDLIBS.
# Also, use our CFLAGS, fix the man page path, and install to /usr,
# not /usr/local.
sed -i -e '/^LIBS\>/s,\<pam\>,,' \
-e '/^LDLIBS\>/s,$, -lpam,' \
-e "/-std=/s,= ,= $SLKCFLAGS ," \
-e 's,share/man,man,g' \
-e 's,usr/local,usr,g' \
makefile
make
strip $PRGNAM
make install DESTDIR=$PKG
gzip $PKG/usr/man/man?/*
# It's a config file, so make it .new
rename lock lock.new $PKG/etc/pam.d/$PRGNAM
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKGDOC
cp -a LICENSE README* $PKGDOC
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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

View file

@ -0,0 +1,10 @@
PRGNAM="gtklock"
VERSION="2.0.1"
HOMEPAGE="https://github.com/jovanlanik/gtklock/"
DOWNLOAD="https://github.com/jovanlanik/gtklock/archive/v2.0.1/gtklock-2.0.1.tar.gz"
MD5SUM="020de32d602b397491dcc112301521eb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="gtk-layer-shell scdoc"
MAINTAINER="Jay Lanagan"
EMAIL="j@lngn.net"

View file

@ -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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
gtklock: gtklock (screen locker for Wayland)
gtklock:
gtklock: gtklock is a lockscreen based on gtkgreet. It uses the wlr-layer-shell
gtklock: and wlr-input-inhibitor Wayland protocols. Works on sway and other
gtklock: wlroots-based compositors.
gtklock:
gtklock:
gtklock:
gtklock:
gtklock:
gtklock: