License: MIT
Source0: %{name}-%{version}.tar.gz
Source1: xresources.service
+Source2: xresources.path
Requires: xserver-xorg-core
Requires: xorg-x11-drv-evdev-multitouch
ln -s /etc/rc.d/init.d/xserver %{buildroot}/etc/rc.d/rc4.d/S02xserver
ln -s /etc/rc.d/init.d/xresources %{buildroot}/etc/rc.d/rc4.d/S80xresources
cp -af arm-common/Xorg.sh %{buildroot}/etc/profile.d/
-mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
+mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/xresources.service
-ln -s ../xresources.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/xresources.service
+install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/xresources.path
+ln -s ../xresources.path %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/
cp -rf arm-e4412/* %{buildroot}/etc/X11/
/etc/X11/xorg.conf.d/*.conf
%{_bindir}/startx
%{_libdir}/systemd/system/xresources.service
-%{_libdir}/systemd/system/multi-user.target.wants/xresources.service
+%{_libdir}/systemd/system/xresources.path
+%{_libdir}/systemd/system/graphical.target.wants/xresources.path
--- /dev/null
+[Unit]
+Description=Path-activation for xresources.service
+
+[Path]
+# This is somehow a not good solution giving that we're
+# depends on Xorg in fact.
+# However, there isn't a stable way let us to *After* Xorg
+# currently, Xorg start finished isn't mean it's ready and
+# even /tmp/.X0-lock was found not stable.
+# Finally, we need change Xorg to sd_notify(3), so the others
+# can rely on *After* it.
+# Also see: https://bugs.tizen.org/jira/browse/TDIST-290
+PathExists=/tmp/.wm_ready
+
+[Install]
+WantedBy=graphical.target
[Unit]
Description=Xresources
-After=tizen-runtime.target
-Requires=tizen-runtime.target
[Service]
-Type=forking
-EnvironmentFile=/run/tizen-mobile-env
+Type=oneshot
+EnvironmentFile=/etc/sysconfig/tizen-mobile-ui
ExecStart=/etc/rc.d/init.d/xresources start
-ExecStop=/etc/rc.d/init.d/xresources stop
+RemainAfterExit=yes
[Install]
-WantedBy=multi-user.target
+WantedBy=graphical.target