Change-Id: Icf6d15c1ad958177ee19e479e3368465261cee44
-KEYMAP_FILE_PATH="/usr/share/X11/xkb/tizen_key_layout.txt"
+if [ "$TZ_SYS_RO_SHARE" = "" ]; then
+ TZ_SYS_RO_SHARE="/usr/share"
+fi
+
+KEYMAP_FILE_PATH="${TZ_SYS_RO_SHARE}/X11/xkb/tizen_key_layout.txt"
BASE_KEYSYM="0x10090000"
TARGET_HEADER_FILE="./xkbcommon/tizen_keymap.h"
TEMP_TEXT_FILE="./temp_file.txt"
BASE_KEYSYM="0x10090000"
TARGET_HEADER_FILE="./xkbcommon/tizen_keymap.h"
TEMP_TEXT_FILE="./temp_file.txt"
BuildRequires: xkb-tizen-data
%endif
BuildRequires: xkb-tizen-data
%endif
+%global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
+
%description
Keyboard handling library using XKB data.
%description
Keyboard handling library using XKB data.
%if "%{?profile}" == "common"
%else
export TIZEN_PROFILE="%{?profile}"
%if "%{?profile}" == "common"
%else
export TIZEN_PROFILE="%{?profile}"
+export TZ_SYS_RO_SHARE="%{TZ_SYS_RO_SHARE}"
chmod a+x ./make_tizen_keymap.sh
./make_tizen_keymap.sh
chmod a+x ./gen_tables.sh
chmod a+x ./make_tizen_keymap.sh
./make_tizen_keymap.sh
chmod a+x ./gen_tables.sh
+#for license notification
+mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
+cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
+
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%manifest %{name}.manifest
%defattr(-,root,root)
%files
%manifest %{name}.manifest
%defattr(-,root,root)
+%{TZ_SYS_RO_SHARE}/license/%{name}
%{_libdir}/libxkbcommon.so.0*
%files devel
%{_libdir}/libxkbcommon.so.0*
%files devel
#/bin/sh
set -euo pipefail
#/bin/sh
set -euo pipefail
-XKBCONFIGROOT='/usr/share/X11/xkb'
-XLOCALEDIR='/usr/share/X11/locale'
+if [ "$TZ_SYS_RO_SHARE" = "" ]; then
+ TZ_SYS_RO_SHARE="/usr/share"
+fi
+
+XKBCONFIGROOT="${TZ_SYS_RO_SHARE}/X11/xkb"
+XLOCALEDIR="${TZ_SYS_RO_SHARE}/X11/locale"
if [ ! -d test/data ]; then
echo "Run this from the top source dir"
if [ ! -d test/data ]; then
echo "Run this from the top source dir"