summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@open.eurogiciel.org>2015-02-05 12:35:18 +0100
committerJosé Bollo <jose.bollo@open.eurogiciel.org>2015-02-06 04:46:34 -0800
commit5652a12582a0fa73e780f0635da6ebf8c516093f (patch)
tree8b0e4442eaa9bb2accb8a2c54c97c60ff95a0682
parentc2b552bd395f4d28f0e369cc1ead4ff18d89a126 (diff)
downloadtizen-platform-config-5652a12582a0fa73e780f0635da6ebf8c516093f.tar.gz
tizen-platform-config-5652a12582a0fa73e780f0635da6ebf8c516093f.tar.bz2
tizen-platform-config-5652a12582a0fa73e780f0635da6ebf8c516093f.zip
The platform config is the place where platform configuration occurs. At this point, the common directories of users are defined by the file tizen-platform.meta/conf. Here is the right place for creating the skeleton of the user's directories. Change-Id: I15f7898dfa786648c64c8dfc90d05fef19c02685 Signed-off-by: José Bollo <jose.bollo@open.eurogiciel.org>
-rw-r--r--packaging/tizen-platform-config.spec36
1 files changed, 36 insertions, 0 deletions
diff --git a/packaging/tizen-platform-config.spec b/packaging/tizen-platform-config.spec
index e611555..c205893 100644
--- a/packaging/tizen-platform-config.spec
+++ b/packaging/tizen-platform-config.spec
@@ -12,6 +12,7 @@ Source0: %{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Source1001: %{name}.manifest
BuildRequires: tizen-platform-wrapper >= 2
+Requires(post): smack
# the main package only contains a config file but other dependent packages
# will contain binary. So, we can't build a noarch package and have to avoid
@@ -59,6 +60,41 @@ cp %{SOURCE1001} .
%install
%make_install
+%post
+##############################################
+# BEGIN - creation of the /etc/skel/content
+##############################################
+saveHOME="$HOME"
+HOME="%{_sysconfdir}/skel"
+. "%{_sysconfdir}/tizen-platform.conf"
+cat << ENDOFCAT |
+$TZ_USER_HOME User::Home true
+$TZ_USER_CONTENT User::Home true
+$TZ_USER_CAMERA User::App::Shared true
+$TZ_USER_DOCUMENTS User::App::Shared true
+$TZ_USER_DOWNLOADS User::App::Shared true
+$TZ_USER_GAMES User::App::Shared true
+$TZ_USER_IMAGES User::App::Shared true
+$TZ_USER_OTHERS User::App::Shared true
+$TZ_USER_SOUNDS User::App::Shared true
+$TZ_USER_VIDEOS User::App::Shared true
+$TZ_USER_SHARE User::App::Shared true
+$TZ_USER_APP User false
+$TZ_USER_DB User false
+$TZ_USER_DESKTOP User false
+$TZ_USER_ICONS User::Home true
+$TZ_USER_PACKAGES User false
+ENDOFCAT
+LANG= sort | while read skelname context transmute; do
+ mkdir -p "$skelname"
+ chsmack -a "$context" "$skelname"
+ [ "$transmute" = true ] && chsmack -t "$skelname"
+done
+HOME="$saveHOME"
+##############################################
+# END - creation of the /etc/skel/content
+##############################################
+
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig