migrate to multiuser mode
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>
Fri, 11 Apr 2014 09:26:09 +0000 (11:26 +0200)
committerNicolas Zingilé <nicolas.zingile@open.eurogiciel.org>
Fri, 11 Apr 2014 09:45:21 +0000 (11:45 +0200)
Change-Id: I570f00f78bc2189a6d25b1c45a09f5ec148b0418
Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Script/launch_cam.sh
Script/launch_video.sh
packaging/desktop-skin.spec

index 75fcd20..c09dbb2 100755 (executable)
@@ -4,17 +4,17 @@
 #  Launch web cam 
 #
 
-touch /home/app/gst-pid
-alreadyrunning=`cat /home/app/gst-pid`
+touch $HOME/gst-pid
+alreadyrunning=`cat $HOME/gst-pid`
 
 cnt=$(echo $alreadyrunning | wc -w)
 if [ $cnt -lt 2  ] ; then
     echo "create new $cnt"
     gst-launch-1.0 v4l2src device=/dev/video$cnt ! video/x-raw, width=640, height=480 ! videoconvert ! waylandsink &
-    echo $!  >> /home/app/gst-pid
+    echo $!  >> $HOME/gst-pid
 else echo "already running"
     for x in $alreadyrunning; do kill -9 $x; done
-    rm -rf /home/app/gst-pid
+    rm -rf $HOME/gst-pid
 fi
 
 
index 6b23c87..43d54fd 100755 (executable)
@@ -4,21 +4,21 @@
 #  Launch web cam 
 #
 
-touch /home/app/gstvid-pid
-alreadyrunning=`cat /home/app/gstvid-pid`
+touch $HOME/gstvid-pid
+alreadyrunning=`cat $HOME/gstvid-pid`
 
 #URL=http://intel07.vannes/~sdx/Downloads/Amazing%20Nature%20full%20HD%20720p.mp4
 #URL=http://intel07.vannes/~sdx/Videos/big_buck_bunny_480p_surround-fix.avi
 #URL=http://intel07.vannes/~sdx/Videos/caminandes_480p.avi
-URL=file:///home/app/AmazingNature_480p.mp4
+URL=file:///usr/share/media/videos/AmazingNature_480p.mp4
 
 if [ $(echo $alreadyrunning | wc -w) -lt 8  ] ; then
     echo "create new"
     gst-launch-1.0 playbin uri=$URL &
-    echo $!  >> /home/app/gstvid-pid
+    echo $!  >> $HOME/gstvid-pid
 else echo "already running"
     for x in $alreadyrunning; do kill -9 $x; done
-    rm -rf /home/app/gstvid-pid
+    rm -rf $HOME/gstvid-pid
 fi
 
 
index f15d25e..39fb2bf 100644 (file)
@@ -1,19 +1,17 @@
-%define USERHOME       /home/app
-
 Name:          desktop-skin
-Summary:       Provides desktop-skin.
+Summary:       Desktop skin for Tizen:Common
 Version:       2.0
-Group:                 Applications
+Group:                 Applications/Multimedia
 License:    GPL-2.0+
 Release:       1
-
-
-
 Source0:        %{name}-%{version}.tar.gz
 
 %description
-Provides desktop-skin.
-
+Provides desktop visuals and test programs
+- desktop background
+- sample media
+- icons
+- test programs
 
 %prep
 %setup -q
@@ -25,11 +23,11 @@ mkdir -p %{buildroot}%{_bindir}
 install -m 755 Script/launch_cam.sh %{buildroot}%{_bindir}
 install -m 755 Script/launch_video.sh %{buildroot}%{_bindir}
 
-mkdir -p %{buildroot}%{USERHOME}
-install -m 644 Video/AmazingNature_480p.mp4 %{buildroot}%{USERHOME}
+mkdir -p %{buildroot}%{_datadir}/media/videos
+install -m 644 Video/AmazingNature_480p.mp4 %{buildroot}%{_datadir}/media/videos
 
-mkdir -p %{buildroot}%{USERHOME}/Photos
-install -m 644 Photos/* %{buildroot}%{USERHOME}/Photos
+mkdir -p %{buildroot}%{_datadir}/media/photos
+install -m 644 Photos/* %{buildroot}%{_datadir}/media/photos
 
 mkdir -p %{buildroot}%{_datadir}/icons/tizen/32x32
 install -m 644 icons/tizen/32x32/* %{buildroot}%{_datadir}/icons/tizen/32x32
@@ -40,19 +38,12 @@ install -m 644 applications/tizen/* %{buildroot}%{_datadir}/applications/tizen
 mkdir -p %{buildroot}%{_datadir}/backgrounds/tizen
 install -m 644  backgrounds/tizen/golfe-morbihan.jpg %{buildroot}%{_datadir}/backgrounds/tizen/golfe-morbihan.jpg
 
-%post
-chown -R app:app %{USERHOME}
-
 %files
 %{_bindir}/launch_cam.sh
 %{_bindir}/launch_video.sh
 
-%{USERHOME}/AmazingNature_480p.mp4
-
-%{USERHOME}/Photos/*
-
+%{_datadir}/media/videos/AmazingNature_480p.mp4
+%{_datadir}/media/photos/*
 %{_datadir}/icons/tizen/32x32/*
-
 %{_datadir}/applications/tizen/*
-
 %{_datadir}/backgrounds/tizen/golfe-morbihan.jpg