summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-06-21 09:16:06 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-21 19:06:46 +1000
commitdd25e1799f58179de3c611e42edfe6087b814d7e (patch)
tree7f5f8e7ebb764d4666c4c61e4955e4e9e26fd798 /src
parent2ee95c7b76bdc004b8b84520c00ac14db4a17bfc (diff)
meson: restore the SELinux context for our .so file on install
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/libinput-restore-selinux-context.sh10
2 files changed, 11 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 08e6aa1..6723d5a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -77,4 +77,4 @@ pkgconfig_DATA = libinput.pc
AM_CFLAGS = $(GCC_CFLAGS)
DISTCLEANFILES = libinput-version.h
-EXTRA_DIST = libinput-version.h.in libinput.sym
+EXTRA_DIST = libinput-version.h.in libinput.sym libinput-restore-selinux-context.sh
diff --git a/src/libinput-restore-selinux-context.sh b/src/libinput-restore-selinux-context.sh
new file mode 100644
index 0000000..7fd8fad
--- /dev/null
+++ b/src/libinput-restore-selinux-context.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# $1: abs path to libdir
+# $2: abs path to .so file
+
+libdir="$1"
+sofile=$(basename "$2")
+
+echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
+restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"