# 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
# 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
-%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
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
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