summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-04-11 16:53:46 +0200
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-04-11 16:53:46 +0200
commit622b49fcc5e2c1bd0f34e30f93df0f325b89abe3 (patch)
tree85e18223ee140e06dd4d26a2398eb248b8635f48
parent4add4965e22cb52e1f0b06391c5324d49a5bfd1c (diff)
downloadwrt-widgets-622b49fcc5e2c1bd0f34e30f93df0f325b89abe3.tar.gz
wrt-widgets-622b49fcc5e2c1bd0f34e30f93df0f325b89abe3.tar.bz2
wrt-widgets-622b49fcc5e2c1bd0f34e30f93df0f325b89abe3.zip
fix widgets install in multiuser mode
Change-Id: I95b2a246750b1eca603775c5be09a70ba3291fb8 Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-rwxr-xr-xinstall_widgets.sh5
-rw-r--r--packaging/wrt-widgets.spec12
2 files changed, 8 insertions, 9 deletions
diff --git a/install_widgets.sh b/install_widgets.sh
index 91f9fc5..42beb02 100755
--- a/install_widgets.sh
+++ b/install_widgets.sh
@@ -25,10 +25,11 @@ do
fi
done
-repo=${TZ_USER_APP}/
-chmod -R a+rw ${TZ_SYS_DB}/
+[[ "$(id -u)" == "0" ]] && chmod -R a+rw ${TZ_SYS_DB}/
if [ -x /usr/bin/wrt-launcher ]; then
+ repo=${TZ_USER_APP}/
+
wrt-launcher --list |
awk 'NR>2{print $2, $5, $6}' |
while read name packid appid
diff --git a/packaging/wrt-widgets.spec b/packaging/wrt-widgets.spec
index fbe246b..e8f6b8a 100644
--- a/packaging/wrt-widgets.spec
+++ b/packaging/wrt-widgets.spec
@@ -6,6 +6,8 @@ Group: Web Framework/Web Run Time
License: Apache-2.0
BuildArch: noarch
Source0: %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(libtzplatform-config)
+Requires: libtzplatform-config
%description
Wrt-widgets prepare a suitable pc oriented environment to install Web apps
@@ -22,16 +24,12 @@ mkdir -p %{buildroot}/%{_bindir}
cp install_widgets.sh %{buildroot}/%{_bindir}
cp prepare_widgets.sh %{buildroot}/%{_bindir}
-if [ ! -d %{buildroot}/%{_datadir}/widget_demo ]
-then
- mkdir -p %{buildroot}/%{_datadir}/widget_demo
-fi
-
-cp -r *.wgt %{buildroot}/%{_datadir}/widget_demo/
+mkdir -p %{buildroot}/%{TZ_SYS_SHARE}/widget_demo
+cp -r *.wgt %{buildroot}/%{TZ_SYS_SHARE}/widget_demo/
%post
%files
-%{_datadir}/widget_demo/*.wgt
+%{TZ_SYS_SHARE}/widget_demo/*.wgt
%attr(755,root,root) %{_bindir}/install_widgets.sh
%attr(755,root,root) %{_bindir}/prepare_widgets.sh