Apply directory macros and install license file to the proper directory
[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 %if "%{?profile}" == "common"
46 %else
47 export TIZEN_PROFILE="%{?profile}"
48 export TZ_SYS_RO_SHARE="%{TZ_SYS_RO_SHARE}"
49 chmod a+x ./make_tizen_keymap.sh
50 ./make_tizen_keymap.sh
51 chmod a+x ./gen_tables.sh
52 ./gen_tables.sh
53 %endif
54
55 %build
56 %autogen --disable-static --disable-x11 --with-tizen-profile="%{?profile}"
57 %__make %{?_smp_mflags} V=1;
58
59 %install
60 %make_install
61
62 #for license notification
63 mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
64 cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
65
66 %post  -p /sbin/ldconfig
67
68 %postun  -p /sbin/ldconfig
69
70 %files
71 %manifest %{name}.manifest
72 %defattr(-,root,root)
73 %{TZ_SYS_RO_SHARE}/license/%{name}
74 %{_libdir}/libxkbcommon.so.0*
75
76 %files devel
77 %manifest %{name}.manifest
78 %defattr(-,root,root)
79 %{_includedir}/xkbcommon
80 %{_libdir}/libxkbcommon.so
81 %{_libdir}/pkgconfig/xkbcommon.pc
82