1 %define _unpackaged_files_terminate_build 0
3 Summary: TCT Behavior Tests
4 Name: tct-behavior-tests
8 Group: test/tct/behavior
9 Source: %name-%version.tar.gz
11 BuildRequires: hash-signer
14 This is TCT behavior tests
22 ./configure --prefix=/usr
26 rm -rf $RPM_BUILD_ROOT
27 rm -rf $RPM_BUILD_DIR/%name
28 make install DESTDIR=$RPM_BUILD_ROOT
29 mkdir -p $RPM_BUILD_DIR/%name
30 cp -a $RPM_BUILD_DIR/%name-%version/index.html $RPM_BUILD_DIR/%name
31 cp -a $RPM_BUILD_DIR/%name-%version/config.xml $RPM_BUILD_DIR/%name
32 cp -a $RPM_BUILD_DIR/%name-%version/icon.png $RPM_BUILD_DIR/%name
33 cp -a $RPM_BUILD_DIR/%name-%version/tests.xml $RPM_BUILD_DIR/%name
34 cp -a $RPM_BUILD_DIR/%name-%version/subtestresult.xml $RPM_BUILD_DIR/%name
35 cp -a $RPM_BUILD_DIR/%name-%version/js $RPM_BUILD_DIR/%name
36 cp -a $RPM_BUILD_DIR/%name-%version/css $RPM_BUILD_DIR/%name
37 cp -a $RPM_BUILD_DIR/%name-%version/tests $RPM_BUILD_DIR/%name
38 cp -a $RPM_BUILD_DIR/%name-%version/res $RPM_BUILD_DIR/%name
39 cd $RPM_BUILD_DIR/%name
40 mkdir -p $RPM_BUILD_ROOT/opt/%name/res/media
41 cp -a $RPM_BUILD_DIR/%name-%version/res/font $RPM_BUILD_ROOT/opt/%name/res/font
42 cp -a $RPM_BUILD_DIR/%name-%version/res/images $RPM_BUILD_ROOT/opt/%name/res/images
43 cp -a $RPM_BUILD_DIR/%name-%version/res/js $RPM_BUILD_ROOT/opt/%name/res/js
44 cp -a $RPM_BUILD_DIR/%name-%version/res/css $RPM_BUILD_ROOT/opt/%name/res/css
45 cp -a $RPM_BUILD_DIR/%name-%version/res/media/red-green.theora.ogv $RPM_BUILD_ROOT/opt/%name/res/media/
46 zip -rq $RPM_BUILD_ROOT/opt/%name/%name.wgt *
47 hash-signer.sh -ad -p platform $RPM_BUILD_ROOT/opt/%name/%name.wgt
51 rm -rf $RPM_BUILD_ROOT
52 rm -rf $RPM_BUILD_DIR/%name
53 rm -rf $RPM_BUILD_DIR/%name-%version
61 wgt_installer="wrt-installer"
62 which $wgt_installer > /dev/null 2>&1
64 echo "Start install package /opt/%name.wgt"
65 [ -e /opt/%name/%name.wgt ] && $wgt_installer -i /opt/%name/%name.wgt
67 echo "Fail to find wgt_installer"
71 wgt_installer="wrt-installer"
72 which $wgt_installer > /dev/null 2>&1
74 echo "Uninstall package %name"
75 i_pkg_nns=`wrt-launcher -l | grep %name | awk '{ print $5 }'`
76 for i_pkg_nn in $i_pkg_nns; do
77 echo "Package Name is $i_pkg_nn"
78 $wgt_installer -un $i_pkg_nn
81 echo "Fail to find wgt_installer"