summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-10-28 11:54:48 +0100
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-10-28 11:54:48 +0100
commit4c00b56c45d4d299090cf516fbdd5dec2583ce39 (patch)
treef42a609f500421de883aa306313dc82d860a417e
parent16fe0e3e97763bb757a717f4c0ac9cc0bf9adc73 (diff)
downloadx11-common-accepted/tizen/common/20141028.111310.tar.gz
x11-common-accepted/tizen/common/20141028.111310.tar.bz2
x11-common-accepted/tizen/common/20141028.111310.zip
add udev rule to change group to 'input' for devices in /dev/input/*submit/tizen_common/20141028.111125accepted/tizen/common/20141028.111310
Change-Id: I5f10cf498eb757241715d65081aa36d12522b96f Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-rw-r--r--packaging/x11-common.spec36
1 files changed, 24 insertions, 12 deletions
diff --git a/packaging/x11-common.spec b/packaging/x11-common.spec
index 1edfc98..0db7f08 100644
--- a/packaging/x11-common.spec
+++ b/packaging/x11-common.spec
@@ -28,18 +28,30 @@ make %{?jobs:-j%jobs}
rm -rf %{buildroot}
%make_install
-mkdir -p %{buildroot}/usr/lib/systemd/system
-mv %{buildroot}/display-manager.path %{buildroot}/usr/lib/systemd/system/
-mv %{buildroot}/display-manager.service %{buildroot}/usr/lib/systemd/system/
-mv %{buildroot}/display-manager-run.service %{buildroot}/usr/lib/systemd/system/
-mkdir -p %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
-ln -sf ../display-manager.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/display-manager.service
-ln -sf ../display-manager-run.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants/display-manager-run.service
+mkdir -p %{buildroot}%{_unitdir}
+mv %{buildroot}/display-manager.path %{buildroot}%{_unitdir}
+mv %{buildroot}/display-manager.service %{buildroot}%{_unitdir}
+mv %{buildroot}/display-manager-run.service %{buildroot}%{_unitdir}
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
+ln -sf ../display-manager.service %{buildroot}%{_unitdir}/multi-user.target.wants/display-manager.service
+ln -sf ../display-manager-run.service %{buildroot}%{_unitdir}/multi-user.target.wants/display-manager-run.service
+
+# rules for /dev/input devices
+mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d/
+cat >%{buildroot}%{_sysconfdir}/udev/rules.d/99-input.rules <<'EOF'
+SUBSYSTEM=="input", MODE="0660", GROUP="input", SECLABEL{smack}="^"
+EOF
+
+%pre
+# create group 'input' if needed
+getent group input >/dev/null || %{_sbindir}/groupadd -r -o input
%files
%defattr(-,root,root,-)
-/usr/lib/systemd/system/display-manager.path
-/usr/lib/systemd/system/display-manager.service
-/usr/lib/systemd/system/display-manager-run.service
-/usr/lib/systemd/system/multi-user.target.wants/display-manager.service
-/usr/lib/systemd/system/multi-user.target.wants/display-manager-run.service
+%{_unitdir}/display-manager.path
+%{_unitdir}/display-manager.service
+%{_unitdir}/display-manager-run.service
+%{_unitdir}/multi-user.target.wants/display-manager.service
+%{_unitdir}/multi-user.target.wants/display-manager-run.service
+%config %{_sysconfdir}/udev/rules.d/*
+