system-controller: change logging to be less misleading.
[profile/ivi/murphy.git] / packaging / murphy.spec
index 0409090..b652525 100644 (file)
@@ -1,3 +1,5 @@
+%bcond_with icosyscon
+
 # By default we build with distro-default compilation flags which
 # enables optimizations. If you want to build with full debugging
 # ie. with optimization turned off and full debug info (-O0 -g3)
@@ -7,7 +9,6 @@
 # squashing the -core and -plugins-base packages into the base
 # murphy package.
 
-%define _with_icosyscon 1
 
 %{!?_with_debug:%{!?_without_debug:%define _without_debug 0}}
 %{!?_with_lua:%{!?_without_lua:%define _with_lua 1}}
@@ -53,7 +54,7 @@
 
 Summary: Resource policy framework
 Name: murphy
-Version: 0.0.56
+Version: 0.0.65
 Release: 1
 License: BSD-3-Clause
 Group: System/Service
@@ -420,14 +421,10 @@ CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-system-monitor"
 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-system-monitor"
 %endif
 
-NUM_CPUS="`cat /proc/cpuinfo | tr -s '\t' ' ' | \
-grep '^processor *:' | wc -l`"
-[ -z "$NUM_CPUS" ] && NUM_CPUS=1
-
-./bootstrap && \
-%configure $CONFIG_OPTIONS --with-dynamic-plugins=$DYNAMIC_PLUGINS && \
-%__make clean && \
-%__make -j$(($NUM_CPUS + 1)) $V
+./bootstrap
+%configure $CONFIG_OPTIONS --with-dynamic-plugins=$DYNAMIC_PLUGINS
+%__make clean
+%__make %{?_smp_mflags} $V
 
 %install
 rm -rf %{buildroot}
@@ -477,12 +474,7 @@ cp packaging.in/murphyd.conf %{buildroot}%{_tmpfilesdir}
 # Copy the systemd files in place.
 mkdir -p %{buildroot}%{_unitdir}
 mkdir -p %{buildroot}%{_unitdir_user}
-cp packaging.in/murphyd.service %{buildroot}%{_unitdir}
-%if %{_enable_icosyscon}
-cp packaging.in/ico-homescreen.service %{buildroot}%{_unitdir_user}
-cp packaging.in/murphy-wait-for-launchpad-ready.path \
-    %{buildroot}%{_unitdir_user}
-%endif
+cp packaging.in/murphyd.service %{buildroot}%{_unitdir_user}
 
 %if %{?_with_dbus:1}%{!?_with_dbus:0}
 mkdir -p %{buildroot}%{_sysconfdir}/dbus-1/system.d
@@ -501,7 +493,7 @@ cp packaging.in/gam-*.names packaging.in/gam-*.tree \
 rm -rf %{buildroot}
 
 %post
-/bin/systemctl enable murphyd.service
+/bin/systemctl --user enable --global murphyd.service
 setcap 'cap_net_admin=+ep' %{_bindir}/murphyd
 
 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
@@ -511,7 +503,7 @@ ldconfig
 
 %postun
 if [ "$1" = "0" ]; then
-/bin/systemctl disable murphyd.service
+/bin/systemctl --user disable --global murphyd.service
 fi
 
 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
@@ -551,23 +543,6 @@ ldconfig
 ldconfig
 %endif
 
-%if %{_enable_icosyscon}
-%post system-controller
-# prevent system controller from starting
-rm -f %{_unitdir_user}/weston.target.wants/ico-uxf-wait-launchpad-ready.path
-# instead launch just ico-homescreen
-rm -f %{_unitdir_user}/weston.target.wants/murphy-wait-for-launchpad-ready.path
-ln -s %{_unitdir_user}/murphy-wait-for-launchpad-ready.path \
-    %{_unitdir_user}/weston.target.wants/murphy-wait-for-launchpad-ready.path
-
-%postun system-controller
-rm -f %{_unitdir_user}/weston.target.wants/murphy-wait-for-launchpad-ready.path
-if [ -f %{_unitdir_user}/ico-uxf-wait-launchpad-ready.path ]; then
-    ln -sf %{_unitdir_user}/ico-uxf-wait-launchpad-ready.path \
-        %{_unitdir_user}/weston.target.wants/ico-uxf-wait-launchpad-ready.path
-fi
-%endif
-
 %post gam
 ldconfig
 
@@ -583,7 +558,7 @@ ldconfig
 %manifest murphy.manifest
 %{_bindir}/murphyd
 %config %{_sysconfdir}/murphy
-%{_unitdir}/murphyd.service
+%{_unitdir_user}/murphyd.service
 %{_tmpfilesdir}/murphyd.conf
 %if %{?_with_audiosession:1}%{!?_with_audiosession:0}
 %{_sbindir}/asm-bridge
@@ -749,6 +724,7 @@ ldconfig
 %{_bindir}/resource-client
 %{_bindir}/resource-api-test
 %{_bindir}/resource-api-fuzz
+%{_bindir}/resource-context-create
 %{_bindir}/test-domain-controller
 %{_bindir}/murphy-console
 %manifest murphy.manifest
@@ -762,8 +738,6 @@ ldconfig
 %files system-controller
 %defattr(-,root,root,-)
 %{_libdir}/murphy/plugins/plugin-system-controller.so
-%{_unitdir_user}/ico-homescreen.service
-%{_unitdir_user}/murphy-wait-for-launchpad-ready.path
 %manifest murphy.manifest
 %endif