#!/bin/sh
-INHOUSE_ID="5000"
+source /etc/tizen-platform.conf
+
+users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
+
+INHOUSE_ID="$users_gid"
init_vconf()
{
- vconftool set -t int memory/idle-screen/top 0 -i -u 5000 -f
- vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" -i -u 5000 -f
- vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -u 5000 -f
+ vconftool set -t int memory/idle-screen/top 0 -i -g $users_gid -f
+ vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" -i -g $users_gid -f
+ vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -g $users_gid -f
}
--- /dev/null
+#!/bin/sh
+source /etc/tizen-platform.conf
+if [ ! -d $1/dbspace ]
+then
+ mkdir -p $1/dbspace
+fi
+if [ ! -d $1/shortcut ]
+then
+ mkdir -p $1/shortcut
+else
+ rm -rf $1/shortcut/*
+fi
+sqlite3 $1/dbspace/.menu_screen.db 'PRAGMA journal_mode = PERSIST;
+ create table if not exists shortcut (
+ ROWID INTEGER PRIMARY KEY AUTOINCREMENT,
+ appid TEXT,
+ name TEXT,
+ type INTEGER,
+ content_info TEXT,
+ icon TEXT
+ );
+'
+users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
+
+INHOUSE_ID="$users_gid"
+chown -R $INHOUSE_ID:$INHOUSE_ID $1
+chown root:$INHOUSE_ID $1/dbspace/.menu_screen.db
+chown root:$INHOUSE_ID $1/dbspace/.menu_screen.db-journal
+
+chmod 660 $1/dbspace/.menu_screen.db
+chmod 660 $1/dbspace/.menu_screen.db-journal
+
+
Name: org.tizen.menu-screen
Summary: Menu screen
Version: 1.1.1
License: Flora
Source0: %{name}-%{version}.tar.gz
Source1001: %{name}.manifest
+Source1002: init_menu-screen_DB.sh
BuildRequires: pkgconfig(ail)
BuildRequires: pkgconfig(appcore-efl)
BuildRequires: pkgconfig(appsvc)
BuildRequires: cmake
BuildRequires: edje-tools
BuildRequires: gettext-tools
+BuildRequires: pkgconfig(libtzplatform-config)
%description
Tizen 2.x Reference Application.
cp %{SOURCE1001} .
%build
-%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}/apps/%{name}/
+%cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}/apps/%{name}/ \
+-DTZ_SYS_ETC=%TZ_SYS_ETC \
+-DTZ_SYS_SMACK=%TZ_SYS_SMACK \
+-DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
+-DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
+-DTZ_SYS_RW_APP=%TZ_SYS_RW_APP \
+-DTZ_SYS_RW_PACKAGES=%TZ_SYS_RW_PACKAGES \
+-DTZ_SYS_USER_GROUP=%TZ_SYS_USER_GROUP
make %{?jobs:-j%jobs}
%install
%make_install
mkdir -p %{buildroot}/%{_datarootdir}/license
+install -D -m 0755 %{SOURCE1002} %{buildroot}%{_datadir}/%{name}/init_menu-screen_DB.sh
%post
-INHOUSE_ID="5000"
+users_gid=$(getent group %TZ_SYS_USER_GROUP | cut -f3 -d':')
+INHOUSE_ID="$users_gid"
init_vconf()
{
- vconftool set -t int memory/idle-screen/top 0 -i -u 5000 -f
- vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" -i -u 5000 -f
- vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -u 5000 -f
+ vconftool set -t int memory/idle-screen/top 0 -i -g $users_gid -f
+ vconftool set -t string file/private/org.tizen.menu-screen/engine "gl" -i -g $users_gid -f
+ vconftool set -t string db/setting/menuscreen/package_name "org.tizen.menu-screen" -i -g $users_gid -f
}
init_vconf
-sqlite3 %{_datadir}/dbspace/.menu_screen.db 'PRAGMA journal_mode = PERSIST;
- create table if not exists shortcut (
- ROWID INTEGER PRIMARY KEY AUTOINCREMENT,
- appid TEXT,
- name TEXT,
- type INTEGER,
- content_info TEXT,
- icon TEXT
- );
-'
-
-INHOUSE_ID="5000"
-chown -R $INHOUSE_ID:$INHOUSE_ID %{_datadir}
-chown root:$INHOUSE_ID %{_datadir}/dbspace/.menu_screen.db
-chown root:$INHOUSE_ID %{_datadir}/dbspace/.menu_screen.db-journal
-
-chmod 660 %{_datadir}/dbspace/.menu_screen.db
-chmod 660 %{_datadir}/dbspace/.menu_screen.db-journal
+%{_datadir}/%{name}/init_menu-screen_DB.sh %{_datadir}
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-/opt/usr/apps/%{name}/*
%{_prefix}/apps/%{name}/*
%{_datarootdir}/packages/%{name}.xml
%{_datarootdir}/license/%{name}
+%{_datadir}/%{name}/init_menu-screen_DB.sh