BuildArch: noarch
Requires(pre): /usr/bin/ln
Requires(pre): /usr/bin/rm
-%if "%{?profile}" == "common"
-%else
BuildRequires: xkb-tizen-data
-%endif
BuildRequires: pkgconfig(xkbcommon)
%global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
%setup -q
cp %{SOURCE1001} .
export TIZEN_PROFILE="%{?profile}"
-%if "%{?profile}" == "common"
-%else
%if %{with x}
export TIZEN_WINDOW_SYSTEM="x11"
export TZ_SYS_RO_SHARE="%{TZ_SYS_RO_SHARE}"
./make_keycodes.sh
./make_symbols.sh
-%endif
%build
%autogen --with-xkb-rules-symlink=xfree86,xorg \
ln -snf %{TZ_SYS_VAR}/lib/xkb/compiled/ %{buildroot}%{_datadir}/X11/xkb/compiled
%find_lang %{name}
%fdupes -s %{buildroot}%{_datadir}/X11/xkb
-%if "%{?profile}" == "common"
-%else
+
cp -af %{buildroot}/%{TZ_SYS_RO_SHARE}/X11/xkb/rules/evdev %{buildroot}/%{TZ_SYS_RO_SHARE}/X11/xkb/rules/tizen_"%{?profile}"
mv -f %{buildroot}/%{TZ_SYS_RO_SHARE}/X11/xkb/rules/evdev %{buildroot}/%{TZ_SYS_RO_SHARE}/X11/xkb/rules/evdev.org
sed -i 's/evdev/tizen_%{?profile}/g' %{buildroot}/%{TZ_SYS_RO_SHARE}/X11/xkb/rules/tizen_"%{?profile}"
#for license notification
mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
-%endif
%files -f %{name}.lang
%manifest %{name}.manifest