packaging: added websocket switch to spec file, enabled by default.
authorKrisztian Litkey <krisztian.litkey@intel.com>
Tue, 12 Feb 2013 09:55:07 +0000 (11:55 +0200)
committerKrisztian Litkey <krisztian.litkey@intel.com>
Thu, 8 Jan 2015 16:37:10 +0000 (18:37 +0200)
packaging.in/murphy.spec.in

index 11fc0b3..978cc2d 100644 (file)
@@ -16,6 +16,7 @@
 %{!?_with_dbus:%{!?_without_dbus:%define _with_dbus 1}}
 %{!?_with_telephony:%{!?_without_telephony:%define _with_telephony 1}}
 %{!?_with_audiosession:%{!?_without_audiosession:%define _with_audiosession 1}}
+%{!?_with_websockets:%{!?_without_websockets:%define _with_websockets 1}}
 %{!?_with_squashpkg:%{!?_without_squashpkg:%define _with_squashpkg 1}}
 
 Summary: Murphy policy framework
@@ -60,6 +61,10 @@ BuildRequires: pkgconfig(ofono)
 %if %{?_with_audiosession:1}%{!?_with_audiosession:0}
 BuildRequires: pkgconfig(audio-session-mgr)
 %endif
+%if %{?_with_websockets:1}%{!?_with_websockets:0}
+BuildRequires: libwebsockets-devel
+BuildRequires: pkgconfig(json)
+%endif
 
 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
 %package core
@@ -288,6 +293,12 @@ DYNAMIC_PLUGINS="$DYNAMIC_PLUGINS,resource-asm"
 CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-resource-asm"
 %endif
 
+%if %{?_with_websockets:1}%{!?_with_websockets:0}
+CONFIG_OPTIONS="$CONFIG_OPTIONS --enable-websockets"
+%else
+CONFIG_OPTIONS="$CONFIG_OPTIONS --disable-websockets"
+%endif
+
 NUM_CPUS="`cat /proc/cpuinfo | tr -s '\t' ' ' | \
                grep '^processor *:' | wc -l`"
 [ -z "$NUM_CPUS" ] && NUM_CPUS=1
@@ -381,6 +392,9 @@ ldconfig
 %{_sysconfdir}/dbus-1/system.d
 %{_sysconfdir}/dbus-1/system.d/org.Murphy.conf
 %endif
+%if %{?_with_websockets:1}%{!?_with_websockets:0}
+%{_datadir}/murphy/webconsole
+%endif
 
 %if %{?_with_squashpkg:0}%{!?_with_squashpkg:1}
 %files core