mkdir -p %{buildroot}%{_unitdir_user}/basic.target.wants
mkdir -p %{buildroot}%{_unitdir_user}/default.target.wants
mkdir -p %{buildroot}%{_unitdir_user}/sockets.target.wants
+mkdir -p %{buildroot}%{_unitdir}/user-basic@.target.wants
+mkdir -p %{buildroot}%{_unitdir}/user-default@.target.wants
+mkdir -p %{buildroot}%{_unitdir}/user-sockets@.target.wants
install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}.service %{buildroot}%{_unitdir_user}/%{alias}.service
install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}-post.service %{buildroot}%{_unitdir_user}/%{alias}-post.service
install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}-ondemand.service %{buildroot}%{_unitdir_user}/%{alias}-ondemand.service
install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}.socket %{buildroot}%{_unitdir_user}/%{alias}.socket
+install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}@.service %{buildroot}%{_unitdir}/%{alias}@.service
+install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}-post@.service %{buildroot}%{_unitdir}/%{alias}-post@.service
+install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}-ondemand@.service %{buildroot}%{_unitdir}/%{alias}-ondemand@.service
+install -m 0644 %{_builddir}/%{name}-%{version}/packaging/%{alias}@.socket %{buildroot}%{_unitdir}/%{alias}@.socket
+
ln -s ../%{alias}.service %{buildroot}%{_unitdir_user}/basic.target.wants/%{alias}.service
ln -s ../%{alias}-post.service %{buildroot}%{_unitdir_user}/default.target.wants/%{alias}-post.service
ln -s ../%{alias}.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/%{alias}.socket
+ln -s ../%{alias}@.service %{buildroot}%{_unitdir}/user-basic@.target.wants/%{alias}@.service
+ln -s ../%{alias}-post@.service %{buildroot}%{_unitdir}/user-default@.target.wants/%{alias}-post@.service
+ln -s ../%{alias}@.socket %{buildroot}%{_unitdir}/user-sockets@.target.wants/%{alias}@.socket
+
%post
/sbin/ldconfig
mkdir -p /opt/share/.elementary
/sbin/ldconfig
rm -f %{buildroot}%{_unitdir_user}/basic.target.wants/%{alias}.service
rm -f %{buildroot}%{_unitdir_user}/default.target.wants/%{alias}-post.service
+rm -f %{buildroot}%{_unitdir}/user-basic@.target.wants/%{alias}@.service
+rm -f %{buildroot}%{_unitdir}/user-default@.target.wants/%{alias}-post@.service
%files
%defattr(-,root,root,-)
%{_unitdir_user}/default.target.wants/%{alias}-post.service
%{_unitdir_user}/sockets.target.wants/%{alias}.socket
%{_unitdir_user}/%{alias}.socket
+%{_unitdir}/%{alias}@.service
+%{_unitdir}/%{alias}-post@.service
+%{_unitdir}/%{alias}-ondemand@.service
+%{_unitdir}/user-basic@.target.wants/%{alias}@.service
+%{_unitdir}/user-default@.target.wants/%{alias}-post@.service
+%{_unitdir}/user-sockets@.target.wants/%{alias}@.socket
+%{_unitdir}/%{alias}@.socket
%manifest %{alias}.manifest
--- /dev/null
+[Unit]
+PartOf=userlogin@%i.target
+Description=Change the efl configures.
+DefaultDependencies=no
+Before=starter@%i.service
+After=enlightenment-user@%i.service
+
+[Service]
+User=%i
+Environment=DBUS_SESSION_BUS_ADDRESS=kernel:path=/sys/fs/kdbus/%i-user/bus;unix:path=/run/user/%i/bus
+Environment=XDG_RUNTIME_DIR=/run/user/%i
+SmackProcessLabel=User
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/usr/bin/sh -c "while [ ! -f /run/.wm_ready ] ; do /usr/bin/sleep .1 ; done ; exec /usr/bin/efl_config"
+EnvironmentFile=-/run/tizen-system-env