packaging: Bump up to 1.5.0
[platform/upstream/libxkbcommon.git] / packaging / libxkbcommon.spec
1 Name:           libxkbcommon
2 Version:        1.5.0
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:  meson
13 BuildRequires:  bison
14 BuildRequires:  flex
15 BuildRequires:  libtool >= 2
16 BuildRequires:  pkgconfig(xorg-macros) >= 1.8
17 BuildRequires:  python
18 BuildRequires:  xkb-tizen-data
19 BuildRequires:  gawk
20
21 ## This BuildRequires is needed when an enable-wayland option is true.
22 #BuildRequires:  pkgconfig(wayland-client)
23 #BuildRequires:  wayland-protocols
24
25 ## This BuildRequires is needed when an enable-xkbregistry option is true.
26 #BuildRequires:  pkgconfig(libxml-2.0)
27
28 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
29
30 %description
31 Keyboard handling library using XKB data.
32
33 %package devel
34 Summary:        Development files for the Wayland libxkbcommon library
35 Group:          Development/Libraries
36 Requires:       %{name} = %{version}-%{release}
37
38 %description devel
39 Keyboard handling library using XKB data.
40
41 This package contains the development headers for the library found
42 in %{name}.
43
44 %prep
45 %setup -q
46 cp %{SOURCE1001} .
47
48 # Generate tizen keymap header
49 export TZ_SYS_RO_SHARE="%{TZ_SYS_RO_SHARE}"
50 chmod a+x ./make_tizen_keymap.sh
51 ./make_tizen_keymap.sh
52 chmod a+x ./gen_tables.sh
53 ./gen_tables.sh
54
55 %build
56 meson setup \
57     -Denable-x11=false \
58     -Denable-docs=false \
59     -Denable-wayland=false \
60         -Denable-xkbregistry=false \
61         -Denable-tools=false \
62         --prefix /usr \
63         --libdir %{_libdir} \
64         builddir
65 ninja -C builddir all
66
67 %install
68 export DESTDIR=%{buildroot}
69 ninja -C builddir install
70
71 %post  -p /sbin/ldconfig
72
73 %postun  -p /sbin/ldconfig
74
75 %files
76 %manifest %{name}.manifest
77 %defattr(-,root,root)
78 %license COPYING
79 %{_libdir}/libxkbcommon.so.0*
80
81 ## disable xkbregistry ##
82 #%{_libdir}/libxkbregistry.so.0*
83
84 ## diable tools ##
85 #%{_bindir}/*
86 #/usr/libexec/xkbcommon/*
87 #%doc %{_mandir}/man?/*
88
89 %files devel
90 %manifest %{name}.manifest
91 %defattr(-,root,root)
92 %{_includedir}/xkbcommon
93 %{_libdir}/libxkbcommon.so
94 %{_libdir}/pkgconfig/xkbcommon.pc
95
96 ## disable xkbregistry ##
97 #%{_libdir}/libxkbregistry.so
98 #%{_libdir}/pkgconfig/xkbregistry.pc