RPM packaging and install files for auto launching
authorKyuho Jo <kyuho.jo@samsung.com>
Sun, 12 Mar 2017 22:32:32 +0000 (07:32 +0900)
committerChulSeung Kim <charles0.kim@samsung.com>
Thu, 8 Jun 2017 09:34:46 +0000 (18:34 +0900)
Change-Id: I60dde27a101d37211d9c42566dde1daa7dcd81d7
Signed-off-by: Kyuho Jo <kyuho.jo@samsung.com>
packaging/org.tizen.xahome.path [new file with mode: 0644]
packaging/org.tizen.xahome.service [new file with mode: 0644]
packaging/org.tizen.xahome.spec

diff --git a/packaging/org.tizen.xahome.path b/packaging/org.tizen.xahome.path
new file mode 100644 (file)
index 0000000..4d7d360
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=This path will tell you that home is ready to launch
+
+[Path]
+PathExists=/run/.wm_ready
diff --git a/packaging/org.tizen.xahome.service b/packaging/org.tizen.xahome.service
new file mode 100644 (file)
index 0000000..af2d194
--- /dev/null
@@ -0,0 +1,7 @@
+[Unit]
+Description=TV Home
+Requires=launchpad-process-pool.service
+After=launchpad-process-pool.service
+
+[Service]
+ExecStart=/bin/sh -c -l '/usr/bin/aul_test launch org.tizen.example.TVHome.TizenTV'
index f8e9e6f9372fc107bd316802e04eed7af34190b3..74812fbe96e430c67bfa37e54bef89b0617222b3 100644 (file)
@@ -5,10 +5,15 @@ Release:    1
 Group:      Applications
 License:    Flora-1.1
 Source0:    %{name}-%{version}.tar.gz
+Source1:    %{name}.service
+Source2:    %{name}.path
 
 BuildRequires:  pkgconfig(libtzplatform-config)
 Requires(post):  /usr/bin/tpk-backend
 
+%define _sysuserdir /systemd/user
+%define _servicedir /systemd/user/default.target.wants
+
 %define internal_name org.tizen.xahome
 %define preload_tpk_path %{TZ_SYS_RO_APP}/.preload-tpk
 
@@ -38,9 +43,16 @@ This is a container package which have preload TPK files
 rm -rf %{buildroot}
 mkdir -p %{buildroot}/%{preload_tpk_path}
 install TVHome/TVHome.TizenTV/bin/Debug/TVHome.TizenTV.tpk %{buildroot}/%{preload_tpk_path}/
+install --directory %{buildroot}%{_prefix}/lib/%{_servicedir}
+install -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/%{_sysuserdir}
+install -m 0644 %{SOURCE2} %{buildroot}%{_prefix}/lib/%{_sysuserdir}
+ln -sf ../%{name}.path %{buildroot}%{_prefix}/lib/%{_servicedir}
 
 %post
 
 %files
 %defattr(-,root,root,-)
 %{preload_tpk_path}/*.tpk
+%{_prefix}/lib/%{_sysuserdir}/%{name}.service
+%{_prefix}/lib/%{_sysuserdir}/%{name}.path
+%{_prefix}/lib/%{_servicedir}/%{name}.path