changeset 2564:5a684edcb663

Fix install and uninstall for el6 rpm Reviewed-by: jerboaa Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-January/022034.html
author Jie Kang <jkang@redhat.com>
date Fri, 20 Jan 2017 08:45:41 -0500
parents 512785b11eda
children 9cee41b8bad1
files distribution/packaging/fedora/thermostat.spec
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/distribution/packaging/fedora/thermostat.spec	Thu Jan 19 17:29:23 2017 -0500
+++ b/distribution/packaging/fedora/thermostat.spec	Fri Jan 20 08:45:41 2017 -0500
@@ -1074,7 +1074,9 @@
 
 %post
 # Install but don't activate
+%if 0%{?with_systemd}
 %systemd_post %{?scl_prefix}%{pkg_name}-storage.service
+%endif
 # Required for icon cache (i.e. Thermostat icon)
 /bin/touch --no-create %{system_root_datadir}/icons/hicolor &>/dev/null || :
 
@@ -1085,7 +1087,9 @@
 %endif
 
 %preun
+%if 0%{?with_systemd}
 %systemd_preun %{?scl_prefix}%{pkg_name}-storage.service
+%endif
 
 %postun
 # Required for icon cache (i.e. Thermostat icon)
@@ -1093,7 +1097,9 @@
     /bin/touch --no-create %{system_root_datadir}/icons/hicolor &> /dev/null
     /usr/bin/gtk-update-icon-cache %{system_root_datadir}/icons/hicolor &>/dev/null || :
 fi
+%if 0%{?with_systemd}
 %systemd_postun %{?scl_prefix}%{pkg_name}-storage.service
+%endif
 
 %posttrans
 # Required for icon cache (i.e. Thermostat icon)