summaryrefslogtreecommitdiffstats
path: root/source/a/upower/upower.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/upower/upower.SlackBuild')
-rwxr-xr-xsource/a/upower/upower.SlackBuild9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/a/upower/upower.SlackBuild b/source/a/upower/upower.SlackBuild
index 04ded50a7..7afa472b0 100755
--- a/source/a/upower/upower.SlackBuild
+++ b/source/a/upower/upower.SlackBuild
@@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=upower
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d- | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
@@ -114,6 +114,13 @@ CXXFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Add upower policy allowing users in the 'power' group
+# to suspend/hibernate the computer:
+mkdir -p $PKG/usr/share/polkit-1/rules.d
+install -m 0644 -o root \
+ $CWD/10-enable-upower-suspend.rules \
+ $PKG/usr/share/polkit-1/rules.d/10-enable-upower-suspend.rules.new
+
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la