786501be798d7305154821d33da2279819696290
[platform/core/uifw/e-mod-tizen-keyrouter.git] / packaging / e-mod-tizen-keyrouter.spec
1 %bcond_with wayland
2
3 Name: e-mod-tizen-keyrouter
4 Version: 0.1.17
5 Release: 1
6 Summary: The Enlightenment Keyrouter Module for Tizen
7 URL: http://www.enlightenment.org
8 Group: Graphics & UI Framework/Other
9 Source0: %{name}-%{version}.tar.gz
10 License: BSD-2-Clause
11 BuildRequires: pkgconfig(enlightenment)
12 BuildRequires:  gettext
13 BuildRequires:  pkgconfig(ttrace)
14 %if %{with wayland}
15 BuildRequires:  pkgconfig(wayland-server)
16 BuildRequires:  pkgconfig(tizen-extension-server)
17 BuildRequires:  pkgconfig(cynara-client)
18 BuildRequires:  pkgconfig(cynara-creds-socket)
19 %endif
20 BuildRequires:  pkgconfig(dlog)
21 %if "%{?profile}" == "common"
22 %else
23 BuildRequires:  xkb-tizen-data
24 %endif
25
26 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
27
28 %description
29 This package is a the Enlightenment Keyrouter Module for Tizen.
30
31 %prep
32 %setup -q
33
34 %build
35
36 export GC_SECTIONS_FLAGS="-fdata-sections -ffunction-sections -Wl,--gc-sections"
37 export CFLAGS+=" -Wall -g -fPIC -rdynamic ${GC_SECTIONS_FLAGS} -DE_LOGGING=1 "
38 export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
39
40 %autogen
41 %if %{with wayland}
42 %configure --prefix=/usr \
43            --enable-wayland-only \
44            --enable-cynara
45 %endif
46
47 make
48
49 %install
50 rm -rf %{buildroot}
51
52 # for license notification
53 mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
54 cp -a %{_builddir}/%{buildsubdir}/COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
55
56
57 # install
58 make install DESTDIR=%{buildroot}
59
60 # clear useless textual files
61 find  %{buildroot}%{_libdir}/enlightenment/modules/%{name} -name *.la | xargs rm
62
63 %files
64 %defattr(-,root,root,-)
65 %{_libdir}/enlightenment/modules/e-mod-tizen-keyrouter
66 %{TZ_SYS_RO_SHARE}/license/%{name}