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")
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
%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} .
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}
%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
--- /dev/null
+[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