summaryrefslogtreecommitdiffstats
path: root/source/a/elogind/elogind.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/elogind/elogind.SlackBuild')
-rwxr-xr-xsource/a/elogind/elogind.SlackBuild17
1 files changed, 15 insertions, 2 deletions
diff --git a/source/a/elogind/elogind.SlackBuild b/source/a/elogind/elogind.SlackBuild
index 1e0e0e3bb..1cf2e5c62 100755
--- a/source/a/elogind/elogind.SlackBuild
+++ b/source/a/elogind/elogind.SlackBuild
@@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=elogind
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -113,7 +113,7 @@ meson \
--libdir /usr/lib${LIBDIRSUFFIX} \
-Drootlibdir="/lib${LIBDIRSUFFIX}" \
-Drootlibexecdir="/lib${LIBDIRSUFFIX}/elogind" \
- -Dudevrulesdir="/etc/udev/rules.d" \
+ -Dudevrulesdir="/lib/udev/rules.d" \
-Ddocdir="/usr/doc/$PKGNAM-$VERSION" \
-Dhtmldir="/usr/doc/$PKGNAM-$VERSION/html" \
-Dmandir="/usr/man" \
@@ -163,6 +163,19 @@ cat $CWD/rc.elogind \
> $PKG/etc/rc.d/rc.elogind.new
chmod 755 $PKG/etc/rc.d/rc.elogind.new
+# Create supported dirs in /etc/elogind/ (local config)
+mkdir -p $PKG/etc/elogind/logind.conf.d/ $PKG/etc/elogind/sleep.conf.d/
+
+# Add login1 policy file that allows users in the 'power' group
+# to shutdown/reboot the computer:
+mkdir -p $PKG/usr/share/polkit-1/rules.d
+install -m 0644 -o root \
+ $CWD/10-enable-elogind-power.rules \
+ $PKG/usr/share/polkit-1/rules.d/10-enable-session-power.rules.new
+
+# We don't need the hidden files to make inferior package managers keep dirs:
+find $PKG -type f -name ".keep_dir" -exec rm -f {} \;
+
# Add a documentation directory:
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
cp -a \