TIVI-2041: Add subpackage for wgt preinstaller service 70/11770/1 accepted/tizen/20131104.233110 accepted/tizen/20131105.192345 accepted/tizen/20131112.015026 accepted/tizen_ivi_stable/20131119.040433 submit/tizen/20131104.224405 submit/tizen_ivi_stable/20131119.032855
authorRusty Lynch <rusty.lynch@intel.com>
Mon, 4 Nov 2013 16:48:56 +0000 (08:48 -0800)
committerRusty Lynch <rusty.lynch@intel.com>
Mon, 4 Nov 2013 22:17:54 +0000 (14:17 -0800)
Add the first-time-run service back and also have the service
call pkgcmd instead of directly using wrt-installer so that the
UI will be signaled about the newly available applications.
Change-Id: I47ceb9363e2810d4ce77e7b0dec4526276180cb9
Signed-off-by: Rusty Lynch <rusty.lynch@intel.com>
CMakeLists.txt
packaging/wrt-installer.spec
wrt-preinstall-widgets.service [new file with mode: 0644]
wrt_preinstall_widgets.sh

index 8be3964..8d7bcda 100644 (file)
@@ -103,6 +103,9 @@ IF(SMACK)
 ENDIF(SMACK)
 ADD_DEFINITIONS("-DWRT_INSTALLER_LOG")  # enable installer log
 
+INSTALL(FILES wrt_preinstall_widgets.sh DESTINATION /usr/bin)
+INSTALL(FILES wrt-preinstall-widgets.service DESTINATION /usr/lib/systemd/system)
+
 ############################# Targets names ###################################
 
 SET(TARGET_INSTALLER_STATIC "wrt-installer_static")
index 6fbfe9c..0db7348 100644 (file)
@@ -5,7 +5,7 @@ Name:       wrt-installer
 Summary:    Installer for tizen Webruntime
 Version:    0.1.138
 Release:    1
-Group:      Development/Libraries
+Group:      Web Framework/Utilities
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1001:    wrt-installer.manifest
@@ -56,6 +56,13 @@ Requires: xmlsec1
 %description
 Description: Wrt Installer for Tizen apps and Wac apps
 
+%package preinstall-service
+Summary: Service for installing wgt files on first boot
+Group:   Web Framework/Utilities
+%description preinstall-service
+This package installs a first time boot systemd service for 
+completing the installation of preinstalled web apps.
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
@@ -99,6 +106,9 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 %make_install
 
+mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
+ln -s ../wrt-preinstall-widgets.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
+
 %clean
 rm -rf %{buildroot}
 
@@ -135,3 +145,8 @@ mkdir -p /opt/share/icons/default/small
     %attr(755,root,root) %{_bindir}/wrt-installer-tests-*
     /opt/share/widget/tests/installer/widgets/*
 %endif
+
+%files preinstall-service
+%attr(755,root,root) %{_bindir}/wrt_preinstall_widgets.sh
+%{_libdir}/systemd/system/wrt-preinstall-widgets.service
+%{_libdir}/systemd/system/graphical.target.wants/wrt-preinstall-widgets.service
diff --git a/wrt-preinstall-widgets.service b/wrt-preinstall-widgets.service
new file mode 100644 (file)
index 0000000..78374a8
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Installation of pre-installed widgets
+ConditionPathExists=!/opt/usr/apps/.preinstallWidgets/preinstallDone
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/wrt_preinstall_widgets.sh
+
+[Install]
+WantedBy=graphical.target
index 9601833..1ab048f 100755 (executable)
@@ -21,7 +21,7 @@ install_widgets() {
        for list in $_wgt_list
        do
                echo "Install $list"
-               wrt-installer -i $list
+               pkgcmd -i -t wgt -p $list -q
        done
 
 }