Generate new keysyms although profile is common
[platform/upstream/libxkbcommon.git] / packaging / libxkbcommon.spec
1 Name:           libxkbcommon
2 Version:        0.4.3
3 Release:        0
4 License:        MIT
5 Summary:        Wayland libxkbcommon library
6 Url:            http://wayland.freedesktop.org/
7 Group:          Development/Libraries
8
9 Source:         %{name}-%{version}.tar.xz
10 #X-Vcs-Url:     https://github.com/xkbcommon/libxkbcommon.git
11 Source1001:     libxkbcommon.manifest
12 BuildRequires:  autoconf >= 2.60
13 BuildRequires:  automake
14 BuildRequires:  bison
15 BuildRequires:  flex
16 BuildRequires:  libtool >= 2
17 BuildRequires:  pkgconfig(xorg-macros) >= 1.8
18 %if "%{?profile}" == "common"
19 %else
20 BuildRequires:  python
21 BuildRequires:  xkb-tizen-data
22 %endif
23
24 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
25
26 %description
27 Keyboard handling library using XKB data.
28
29 %package devel
30 Summary:        Development files for the Wayland libxkbcommon library
31 Group:          Development/Libraries
32 Requires:       %{name} = %{version}-%{release}
33
34 %description devel
35 Keyboard handling library using XKB data.
36
37 This package contains the development headers for the library found
38 in %{name}.
39
40 %prep
41 %setup -qn %{name}
42 cp %{SOURCE1001} .
43
44 # Generate tizen keymap header except common profile
45 export TIZEN_PROFILE="%{?profile}"
46 export TZ_SYS_RO_SHARE="%{TZ_SYS_RO_SHARE}"
47 chmod a+x ./make_tizen_keymap.sh
48 ./make_tizen_keymap.sh
49 chmod a+x ./gen_tables.sh
50 ./gen_tables.sh
51
52 %build
53 %autogen --disable-static --disable-x11 --with-tizen-profile="%{?profile}"
54 %__make %{?_smp_mflags} V=1;
55
56 %install
57 %make_install
58
59 #for license notification
60 mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
61 cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
62
63 %post  -p /sbin/ldconfig
64
65 %postun  -p /sbin/ldconfig
66
67 %files
68 %manifest %{name}.manifest
69 %defattr(-,root,root)
70 %{TZ_SYS_RO_SHARE}/license/%{name}
71 %{_libdir}/libxkbcommon.so.0*
72
73 %files devel
74 %manifest %{name}.manifest
75 %defattr(-,root,root)
76 %{_includedir}/xkbcommon
77 %{_libdir}/libxkbcommon.so
78 %{_libdir}/pkgconfig/xkbcommon.pc
79