Generate new keysyms although profile is common
[platform/upstream/libxkbcommon.git] / packaging / libxkbcommon.spec
index 70fffc3..94cc05c 100644 (file)
@@ -15,6 +15,13 @@ BuildRequires:  bison
 BuildRequires:  flex
 BuildRequires:  libtool >= 2
 BuildRequires:  pkgconfig(xorg-macros) >= 1.8
+%if "%{?profile}" == "common"
+%else
+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.
@@ -22,7 +29,7 @@ Keyboard handling library using XKB data.
 %package devel
 Summary:        Development files for the Wayland libxkbcommon library
 Group:          Development/Libraries
-Requires:       %{name} = %{version}
+Requires:       %{name} = %{version}-%{release}
 
 %description devel
 Keyboard handling library using XKB data.
@@ -34,13 +41,25 @@ in %{name}.
 %setup -qn %{name}
 cp %{SOURCE1001} .
 
+# Generate tizen keymap header except common profile
+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
+./gen_tables.sh
+
 %build
-%autogen --disable-static --disable-x11
+%autogen --disable-static --disable-x11 --with-tizen-profile="%{?profile}"
 %__make %{?_smp_mflags} V=1;
 
 %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
@@ -48,7 +67,7 @@ cp %{SOURCE1001} .
 %files
 %manifest %{name}.manifest
 %defattr(-,root,root)
-%license COPYING
+%{TZ_SYS_RO_SHARE}/license/%{name}
 %{_libdir}/libxkbcommon.so.0*
 
 %files devel