summaryrefslogtreecommitdiff
path: root/source/xap/xlockmore
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2020-02-06 01:59:35 +0000
committerEric Hameleers <alien@slackware.com>2020-02-06 08:59:47 +0100
commit194ec853e8f20fd32d5a91eec74ff77383093f4e (patch)
tree44c5392ff2bffceadf4c0b62e675c4d35744100c /source/xap/xlockmore
parentbc237eb78dd4cf07fb2b080666bf32e46bc7ba9a (diff)
downloadcurrent-99f0a74a4add670280b54e7ce35c85bccd808b77.tar.gz
Thu Feb 6 01:59:35 UTC 202020200206015935
a/hwdata-0.332-noarch-1.txz: Upgraded. a/kernel-firmware-20200204_b791e15-noarch-1.txz: Upgraded. a/kernel-generic-5.4.18-x86_64-1.txz: Upgraded. a/kernel-huge-5.4.18-x86_64-1.txz: Upgraded. a/kernel-modules-5.4.18-x86_64-1.txz: Upgraded. d/cmake-3.16.4-x86_64-1.txz: Upgraded. d/icecream-1.3.1-x86_64-1.txz: Upgraded. d/kernel-headers-5.4.18-x86-1.txz: Upgraded. k/kernel-source-5.4.18-noarch-1.txz: Upgraded. xap/xlockmore-5.62-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/xap/xlockmore')
-rw-r--r--source/xap/xlockmore/doinst.sh14
-rw-r--r--source/xap/xlockmore/xlock.pam5
-rwxr-xr-xsource/xap/xlockmore/xlockmore.SlackBuild19
3 files changed, 34 insertions, 4 deletions
diff --git a/source/xap/xlockmore/doinst.sh b/source/xap/xlockmore/doinst.sh
new file mode 100644
index 00000000..3c7968d9
--- /dev/null
+++ b/source/xap/xlockmore/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/pam.d/xlock.new
diff --git a/source/xap/xlockmore/xlock.pam b/source/xap/xlockmore/xlock.pam
new file mode 100644
index 00000000..fcb7a466
--- /dev/null
+++ b/source/xap/xlockmore/xlock.pam
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth include system-auth
+account include system-auth
+password include system-auth
+session include system-auth
diff --git a/source/xap/xlockmore/xlockmore.SlackBuild b/source/xap/xlockmore/xlockmore.SlackBuild
index 6e884cf6..25322d6c 100755
--- a/source/xap/xlockmore/xlockmore.SlackBuild
+++ b/source/xap/xlockmore/xlockmore.SlackBuild
@@ -85,10 +85,13 @@ mkdir -p $PKG/usr/doc/xlockmore-$VERSION
cp -a README $PKG/usr/doc/xlockmore-$VERSION/README
cp -a docs/* $PKG/usr/doc/xlockmore-$VERSION
cp -a $CWD/l-bob.README $PKG/usr/doc/xlockmore-$VERSION
-## Normal compile:
-#./configure --prefix=/usr --without-opengl --without-mesagl \
-# --without-dtsaver --without-rplay --without-nas --disable-bomb
-# Use MesaGL/OpenGL:
+
+if [ -L /lib${LIBDIRSUFFIX}/libpam.so.? ]; then
+ USE_PAM="--enable-pam"
+else
+ unset USE_PAM
+fi
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -101,6 +104,7 @@ CXXFLAGS="$SLKCFLAGS" \
--without-motif \
--without-esound \
--without-gtk \
+ $USE_PAM \
--enable-appdefaultdir=/etc/X11/app-defaults \
--build=$ARCH-slackware-linux || exit 1
@@ -123,6 +127,13 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+if [ ! -z $USE_PAM ]; then
+ mkdir -p $PKG/etc/pam.d
+ cat $CWD/xlock.pam > $PKG/etc/pam.d/xlock.new
+ # Only used for PAM:
+ zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+fi
+
# Build the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/xlockmore-$VERSION-$ARCH-$BUILD.txz