summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorGeoffroy Van Cutsem <geoffroy.vancutsem@intel.com>2012-09-04 23:47:01 +0200
committerGeoffroy Van Cutsem <geoffroy.vancutsem@intel.com>2012-10-01 14:45:59 -0700
commitb10b778d6c3611387a1226016b2f6de52c3f92a4 (patch)
tree09b632401191c2a7bfe47c3ca9c1a39bcb8a4214 /packaging
parent710cff40935203cf9b6332f792d109878bb26341 (diff)
downloadivi-demo-config-b10b778d6c3611387a1226016b2f6de52c3f92a4.tar.gz
ivi-demo-config-b10b778d6c3611387a1226016b2f6de52c3f92a4.tar.bz2
ivi-demo-config-b10b778d6c3611387a1226016b2f6de52c3f92a4.zip
Major revision of package
Added changelog information Moved source file to correct location Fix spec file Remove conflicts with Wayland as it causes a list of things to be removed Update xorg.conf file Update AMB config file for demo Add couple of scripts to use gear stick pad buttons Fix automotive-message-broker version requirement Correct path to AMB config file Bump up version Revamp of rundemo.sh script to use 'case' instead of nested 'if' Add postinstall script to give any system a unique, friendly name
Diffstat (limited to 'packaging')
-rw-r--r--packaging/configwheeldemo19
-rw-r--r--packaging/ivi-demo-config.changes11
-rw-r--r--packaging/ivi-demo-config.spec31
-rw-r--r--packaging/rundemo.sh76
-rw-r--r--packaging/start_video.sh8
-rw-r--r--packaging/xorg-dual.conf17
6 files changed, 159 insertions, 3 deletions
diff --git a/packaging/configwheeldemo b/packaging/configwheeldemo
new file mode 100644
index 0000000..d0354e1
--- /dev/null
+++ b/packaging/configwheeldemo
@@ -0,0 +1,19 @@
+{
+ "sources" : [
+ {
+ "name" : "WheelSource",
+ "path" : "/usr/lib/automotive-message-broker/wheelsourceplugin.so"
+ }
+ ],
+ "sinks": [
+ {
+ "name" : "WebSocketSink",
+ "path" : "/usr/lib/automotive-message-broker/websocketsinkplugin.so"
+ } ,
+ {
+ "path" : "/usr/lib/automotive-message-broker/demosinkplugin.so",
+ "script" : "/usr/lib/automotive-message-broker/scripts/rundemo.sh %1"
+ }
+ ]
+}
+
diff --git a/packaging/ivi-demo-config.changes b/packaging/ivi-demo-config.changes
new file mode 100644
index 0000000..1f61103
--- /dev/null
+++ b/packaging/ivi-demo-config.changes
@@ -0,0 +1,11 @@
+* Mon Oct 01 2012 Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> 2bf0bed
+- Add postinstall script to give any system a unique, friendly name
+- Revamp of rundemo.sh script to use 'case' instead of nested 'if'
+- Correct path to AMB config file - Bump up version
+- Fix automotive-message-broker version requirement
+- Update AMB config file for demo - Add couple of scripts to use gear stick pad buttons
+- Remove conflicts with Wayland as it causes a list of things to be removed
+
+* Tue Sep 04 2012 Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> 710cff4
+- Initial packaging of Tizen IVI demo config (xorg.conf)
+
diff --git a/packaging/ivi-demo-config.spec b/packaging/ivi-demo-config.spec
index e513a3f..f55d9ef 100644
--- a/packaging/ivi-demo-config.spec
+++ b/packaging/ivi-demo-config.spec
@@ -1,13 +1,17 @@
Name: ivi-demo-config
Summary: Custom configs for Tizen IVI demos
-Version: 0.0.1
+Version: 0.0.3
Release: 1
Group: System/Libraries
License: Apache License, Version 2.0
URL: http://www.tizen.org
-Source0: xorg.conf
+Source0: xorg-dual.conf
+Source1: configwheeldemo
+Source2: rundemo.sh
+Source3: start_video.sh
Requires: xorg-x11-server
-Conflicts: wayland
+Requires: automotive-message-broker >= 0.3
+#Conflicts: wayland
%description
Provides customizations for Tizen IVI demos
@@ -23,8 +27,29 @@ Provides customizations for Tizen IVI demos
%install
rm -rf %{buildroot}
+mkdir -p %{buildroot}%{_sysconfdir}/X11/
install -m 644 %{SOURCE0} %{buildroot}%{_sysconfdir}/X11/xorg.conf
+mkdir -p %{buildroot}%{_sysconfdir}/ambd/
+install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ambd/config
+
+mkdir -p %{buildroot}%{_libdir}/automotive-message-broker/scripts
+install -m 755 %{SOURCE2} %{buildroot}%{_libdir}/automotive-message-broker/scripts/rundemo.sh
+install -m 755 %{SOURCE3} %{buildroot}%{_libdir}/automotive-message-broker/scripts/start_video.sh
+
+%post
+# Create a new machine-info file in order to have a friendly name
+#!/bin/bash
+if [ ! -e %{_sysconfdir}/machine-info ]; then
+ HOST_ID=$(hostid)
+ cat > %{_sysconfdir}/machine-info <<EOF
+PRETTY_NAME=Tizen IVI $HOST_ID
+ICON_NAME=Tizen IVI
+EOF
+fi
+
%files
%defattr(-,root,root,-)
%config %{_sysconfdir}/X11/xorg.conf
+%config %{_sysconfdir}/ambd/config
+%{_libdir}/automotive-message-broker/scripts/*
diff --git a/packaging/rundemo.sh b/packaging/rundemo.sh
new file mode 100644
index 0000000..0de2a05
--- /dev/null
+++ b/packaging/rundemo.sh
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+BUTTONVALUE=$1
+echo "Button pressed: ${BUTTONVALUE}"
+
+GST_LAUNCH_BIN="/usr/bin/gst-launch-0.10"
+
+VIDEO_SCRIPT_NAME="/usr/lib/automotive-message-broker/scripts/start_video.sh"
+RIGHT_CAMERA_DEV="/dev/video0"
+LEFT_CAMERA_DEV="/dev/video1"
+
+VIDEO_DISPLAY=":0"
+CAMERA_DISPLAY=":0"
+
+case ${BUTTONVALUE} in
+ "Right")
+ echo "Starting right-camera view"
+ RIGHT_CAMERA_PID=$[ $(pgrep -f $RIGHT_CAMERA_DEV) ]
+ if [ $RIGHT_CAMERA_PID = "0" ]; then
+ DISPLAY=$CAMERA_DISPLAY $GST_LAUNCH_BIN v4l2src device=$RIGHT_CAMERA_DEV ! 'video/x-raw-yuv,width=1920,height=1080,framerate=5/1' ! xvimagesink
+ fi
+ ;;
+ "Left")
+ echo "Starting left-camera view"
+ LEFT_CAMERA_PID=$[ $(pgrep -f $LEFT_CAMERA_DEV) ]
+ if [ $LEFT_CAMERA_PID = "0" ]; then
+ DISPLAY=$CAMERA_DISPLAY $GST_LAUNCH_BIN v4l2src device=$LEFT_CAMERA_DEV ! 'video/x-raw-yuv,width=1920,height=1080,framerate=5/1' ! xvimagesink
+ fi
+ ;;
+ "Off")
+# killall $GST_LAUNCH_BIN
+ RIGHT_CAMERA_PID=$[ $(pgrep -f $RIGHT_CAMERA_DEV) ]
+ LEFT_CAMERA_PID=$[ $(pgrep -f $LEFT_CAMERA_DEV) ]
+ if [ $RIGHT_CAMERA_PID != "0" ]; then
+ echo "Stopping right-view camera"
+ kill $RIGHT_CAMERA_PID
+ elif [ $LEFT_CAMERA_PID != "0" ]; then
+ echo "Stopping left-view camera"
+ kill $LEFT_CAMERA_PID
+ else
+ echo "No camera to stop"
+ fi
+ ;;
+
+ "Button1")
+ #Run script 1 here
+ echo "Button 1 script - initiating NFC BT handover"
+ /usr/lib/neard/test/bt-handover
+ ;;
+ "Button2")
+ #Run script 2 here
+ echo "Button 2 script!"
+ ;;
+ "Button3")
+ #Run script 3 here
+ echo "Button 3 script!"
+ ;;
+ "Button4")
+ #Run script 4 here
+ VIDEO_SCRIPT_PID=$[ $(pgrep -f $VIDEO_SCRIPT_NAME) ]
+ if [ $VIDEO_SCRIPT_PID = "0" ]; then
+ echo "Starting Kids entertainment!"
+ DISPLAY=$VIDEO_DISPLAY $VIDEO_SCRIPT_NAME
+ else
+ echo "Stopping Kids entertainment!"
+ while [ $VIDEO_SCRIPT_PID != "0" ]; do
+ pkill -P $VIDEO_SCRIPT_PID gst-launch
+ VIDEO_SCRIPT_PID=$[ $(pgrep -f $VIDEO_SCRIPT_NAME) ]
+ done
+ fi
+ ;;
+ *)
+ echo "Button not implemented"
+ ;;
+esac
+
diff --git a/packaging/start_video.sh b/packaging/start_video.sh
new file mode 100644
index 0000000..9edcb42
--- /dev/null
+++ b/packaging/start_video.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+#while true ;
+# do
+# gst-launch-0.10 playbin2 uri=file:///root/videos/The_Magic_of_Flight_720p.mp4 ;
+ gst-launch-0.10 filesrc location=/root/videos/The_Magic_of_Flight_720p.mp4 ! qtdemux ! vaapidecode ! vaapisink fullscreen=true ;
+ gst-launch-0.10 filesrc location=/root/videos/SuperSpeedway_720p.mp4 ! qtdemux ! vaapidecode ! vaapisink fullscreen=true ;
+#done
+
diff --git a/packaging/xorg-dual.conf b/packaging/xorg-dual.conf
new file mode 100644
index 0000000..f60e76a
--- /dev/null
+++ b/packaging/xorg-dual.conf
@@ -0,0 +1,17 @@
+Section "Device"
+ Identifier "Intel GenX"
+ Driver "intel"
+ Option "monitor-HDMI3" "driver-screen"
+ Option "monitor-VGA1" "passenger-screen"
+EndSection
+
+Section "Monitor"
+ Identifier "driver-screen"
+ Option "PreferredMode" "1024x768"
+EndSection
+
+Section "Monitor"
+ Identifier "passenger-screen"
+ Option "PreferredMode" "1024x768"
+ Option "RightOf" "driver-screen"
+EndSection