From: Sung-Jin Park Date: Fri, 11 Mar 2016 07:25:34 +0000 (+0900) Subject: Apply directory macros and install license file to the proper directory X-Git-Tag: submit/tizen/20220208.095446~21 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f08a2cc38a26a91aed7718acee25b54047ff604d;p=platform%2Fupstream%2Flibxkbcommon.git Apply directory macros and install license file to the proper directory Change-Id: Icf6d15c1ad958177ee19e479e3368465261cee44 --- diff --git a/make_tizen_keymap.sh b/make_tizen_keymap.sh index a61d148..1acb2fe 100755 --- a/make_tizen_keymap.sh +++ b/make_tizen_keymap.sh @@ -1,6 +1,10 @@ #!/bin/sh -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" diff --git a/packaging/libxkbcommon.spec b/packaging/libxkbcommon.spec index 136f9cc..c8878b8 100644 --- a/packaging/libxkbcommon.spec +++ b/packaging/libxkbcommon.spec @@ -21,6 +21,8 @@ BuildRequires: python 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. @@ -43,6 +45,7 @@ cp %{SOURCE1001} . %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 @@ -56,6 +59,10 @@ chmod a+x ./gen_tables.sh %install %make_install +#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 @@ -63,7 +70,7 @@ chmod a+x ./gen_tables.sh %files %manifest %{name}.manifest %defattr(-,root,root) -%license COPYING +%{TZ_SYS_RO_SHARE}/license/%{name} %{_libdir}/libxkbcommon.so.0* %files devel diff --git a/test/data/sync.sh b/test/data/sync.sh index 2cbcc0a..d5d6b3f 100755 --- a/test/data/sync.sh +++ b/test/data/sync.sh @@ -1,8 +1,12 @@ #/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"