Install systemd service file directly 52/243852/1
authorSangyoon Jang <jeremy.jang@samsung.com>
Thu, 10 Sep 2020 10:57:40 +0000 (19:57 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Thu, 10 Sep 2020 10:57:40 +0000 (19:57 +0900)
Change-Id: If656c2e286600c64cf590d139acd2cbc8e32cae2
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
packaging/tizen-theme-manager.spec

index 5b3c263..1ee5efd 100644 (file)
@@ -48,6 +48,7 @@ set current theme.
 %prep
 %setup -q
 cp %{SOURCE1001} .
+cp %{SOURCE1002} .
 
 %build
 %if 0%{?gcov:1}
@@ -88,6 +89,9 @@ install -m 644 %{SOURCE1002} %{buildroot}%{_unitdir}
 install -m 755 -d %{buildroot}%{_sysconfdir}/dbus-1/system.d
 install -m 644 %{SOURCE1003} %{buildroot}%{_sysconfdir}/dbus-1/system.d
 
+mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
+ln -sf ../%{name}.service %{buildroot}%{_unitdir}/multi-user.target.wants/%{name}.service
+
 %if 0%{?gcov:1}
 mkdir -p %{buildroot}%{_datadir}/gcov/obj
 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
@@ -95,11 +99,10 @@ install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
 
 %post
 /sbin/ldconfig
-systemctl reenable %{name}
 systemctl restart %{name}
 
 %preun
-systemctl disable %{name}
+systemctl stop %{name}
 
 %postun
 /sbin/ldconfig
@@ -114,6 +117,7 @@ systemctl disable %{name}
 %{_sysconfdir}/package-manager/parserlib/metadata/libtizen-theme-plugin.so
 %{_datarootdir}/parser-plugins/tizen-theme-plugin.info
 %{_unitdir}/%{name}.service
+%{_unitdir}/multi-user.target.wants/%{name}.service
 %{_sysconfdir}/dbus-1/system.d/%{name}.conf
 
 %files -n capi-appfw-tizen-theme